janeczku / rancher-letsencrypt

:cow: Rancher service that obtains and manages free SSL certificates from the Let's Encrypt CA
Apache License 2.0
326 stars 114 forks source link

updated azure dependencies fixes #89 #90

Open annerajb opened 7 years ago

annerajb commented 7 years ago

Fixes #89

Can you verify this?

dzirkler commented 7 years ago

I pulled down your code and did a local build, but still get the same auth-header error...

8/11/2017 11:34:23 AMtime="2017-08-11T18:34:23Z" level=error msg="[mydomain.com] Error obtaining certificate: Error presenting token: dns.ZonesClient#Get: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: Service returned an error. Status=401 Code=\"AuthenticationFailed\" Message=\"Authentication failed. The 'Authorization' header is missing.\""

dzirkler commented 7 years ago

After looking at the Dockerfile, I think it's just pulling down a binary of the last build... I'll keep looking. Would love to validate this for you (which would mean it works for all of us!)

annerajb commented 7 years ago

I was not able to get it working either. Had issues with the setup of the build environment. The xenolf/Lego guys told me to update the libraries.

dzirkler commented 7 years ago

Unfortunately, i don't know go ... so we'll see!

dzirkler commented 7 years ago

I made a new Dockerfile to make sure I was picking up the new build, and looks like it's still generating the error, so unfortunately updating the libraries hasn't resolved this issue...

Dockerfile for reference (run from repo root):

FROM golang:alpine AS build-env
RUN apk add --update make git 
WORKDIR /src
ADD . .
RUN go get github.com/Sirupsen/logrus
RUN go get github.com/janeczku/rancher-letsencrypt/letsencrypt
RUN make build

# final stage
FROM alpine:3.5
COPY --from=build-env /src/build/rancher-letsencrypt-linux-amd64 /usr/bin/rancher-letsencrypt
COPY package/rancher-entrypoint.sh /usr/bin/
RUN apk add --no-cache ca-certificates openssl bash &&\
    wget -O /usr/bin/update-rancher-ssl https://raw.githubusercontent.com/rancher/rancher/08278ace626ada71384fc949bd637f4c15b03b53/server/bin/update-rancher-ssl && \
    chmod +x /usr/bin/update-rancher-ssl &&\
    chmod +x /usr/bin/rancher-letsencrypt

EXPOSE 80
ENTRYPOINT ["/usr/bin/rancher-entrypoint.sh"]
annerajb commented 7 years ago

That dockerfile is downloading janeczku/rancher-letsencrypt repo the fixes for the authentication header are in annerajb/rancher-letsencrypt.

If you modify the dockerfile it causes another issue The context.go requires updating from looking for janeczku/rancher-letsencrypt to annerajb/rancher-letsencrypt.

I have no idea why people do this in GO.... but I haven't worked more than 2 hours with it.(for fixing this issue)

annerajb commented 7 years ago

and obviously circleci failed since it's hardcoded to only pull this repository.... to the go vendor folder.

annerajb commented 6 years ago

Maybe anybody with access to the original repo can help on how to update that go dependency? To this same repo?

p1Machado commented 5 years ago

@annerajb nobody did deploy your fix?

annerajb commented 5 years ago

nope i ended up using the cname option.

On Tue, Feb 12, 2019 at 4:48 PM Patrick Machado notifications@github.com wrote:

@annerajb https://github.com/annerajb nobody did deploy your fix?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/janeczku/rancher-letsencrypt/pull/90#issuecomment-462949535, or mute the thread https://github.com/notifications/unsubscribe-auth/AA14XgEIeHJDaEfVhL6GV53y-e42A-VYks5vMzaigaJpZM4O0uYv .