_FILE suffix not working for AzureDNS? #2254
-
I'm looking at the https://github.com/go-acme/lego/blob/master/providers/dns/azuredns/azuredns.go code and I can't see it taking
Does each provider implement the I've noticed these values don't appear to work when I was trying to configure the ACME DNS challenge using the By comparison https://github.com/go-acme/lego/blob/master/providers/dns/oraclecloud/oraclecloud.go has a section for handling a EDIT: OK, Found it. It should be globally handled... https://github.com/go-acme/lego/blob/master/platform/config/env/env.go#L144 Extracted from Traefik issue. docker-compose.ymlservices:
traefik:
image: "traefik:v3.1"
container_name: "traefik"
env_file:
- ./azuredns/.env
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt/:/letsencrypt/"
- "./traefik.yml:/etc/traefik/traefik.yml"
- "./services/:/services/"
- "./azuredns/:/azuredns/"
- "./certs/:/certs/"
- "/var/log/traefik/:/var/log/traefik/" traefik.ymlentryPoints:
web:
address: :80
websecure:
asDefault: true
address: :443
http:
tls:
certResolver: le
domains:
- main: "*.domain.com"
sans:
- "domain.com"
certificatesResolvers:
le:
acme:
email: [email protected]
storage: /letsencrypt/acme.json
caserver: "https://acme-v02.api.letsencrypt.org/directory"
dnsChallenge:
provider: azuredns Finally, I have the following in the
Logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hello, based on your issue on Traefik you are using Traefik v3.1.2 and so lego v4.17.4 https://github.com/traefik/traefik/blob/v3.1.2/go.mod#L20
No and yes, there is a specific code inside lego, that a provider can use to handle that.
The specific code is the function lego/providers/dns/azuredns/azuredns.go Lines 102 to 146 in 29e98f8
No really, oracle has just one value handle "manually". Ping @pchanvallon |
Beta Was this translation helpful? Give feedback.
-
I know this is somewhat annoying, because you're providing a library whilst I'm trying to figure out how it works inside of a tool that's using said library (i.e. Traefik vs LEGO), but are you perhaps aware of how I could try and debug this issue? From my end it seems the configuration is sound, yet at the end an |
Beta Was this translation helpful? Give feedback.
-
Hello @ldez, @arp-mbender, I have tested this usecase successfully in my own Azure environment. # Create files containing Azure credentials
echo "<CLIENT-ID>" > "./client-id"
echo "<CLIENT-SECRET>" > "./client-secret"
echo "<TENANT-ID>" > "./tenant-id"
# Create environment variables to reference those files
export AZURE_CLIENT_ID_FILE="./client-id"
export AZURE_CLIENT_SECRET_FILE="./client-secret"
export AZURE_TENANT_ID_FILE="./tenant-id"
# Set authentication method to environment variables usage
export AZURE_AUTH_METHOD="env"
# Launch `lego` binary
./dist/lego --domains "<DOMAIN-NAME>" --email "<CONTACT-EMAIL>" --dns azuredns run Hope it will help you to solve your issue. |
Beta Was this translation helpful? Give feedback.
Yes, it's what I explained, @arp-mbender should use the right auth method.
And from what I understand of your message it's
env
.