Skip to content

Add DNS provider for EdgeCDN-X - #3381

Merged
ldez merged 3 commits into
go-acme:mainfrom
ldez:feat/dns/edgecdnx
Nov 13, 2026
Merged

ldez merged 3 commits into
go-acme:mainfrom
ldez:feat/dns/edgecdnx

Conversation

@ldez

@ldez ldez commented Nov 13, 2026

Copy link
Copy Markdown
Member

Closes #3379

Ping @fr6nco, can you run the command with your domain, credentials, etc. (and put the output of this command to a comment)?

make build
rm -rf .lego

EDGECDNX_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \
EDGECDNX_PROJECT_ID="project-id" \
./dist/lego run --dns edgecdnx -d '*.example.com' -d example.com -s letsencrypt-staging

Note that the wildcard domain is important.

How to test this PR?
  1. You need Go
  2. Check out the PR:
    git clone https://github.com/ldez/lego.git
    cd lego
    git checkout feat/dns/edgecdnx
  3. Compile lego:
    • if you have make: make build
    • if you don't have make: go build -o dist/lego ./cmd/lego
  4. Run the following command with your information (email, domain, credentials):
    EDGECDNX_API_KEY="xxxxxxxxxxxxxxxxxxxxx" \
    EDGECDNX_PROJECT_ID="project-id" \
    ./dist/lego run --dns edgecdnx -d '*.example.com' -d example.com -s letsencrypt-staging
    The wildcard domain is important
  5. Before each run of the command, you should clean your local environment:
    rm -rf .lego

@ldez ldez added enhancement area/dnsprovider waiting-for/user-tests Need users to test functionality waiting-for/contrib-feedback Awaiting feedback from the contributor. new-provider labels Nov 13, 2026
@ldez

ldez commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

I will not lie, this API is very unfriendly to use, it was not easy to create something based on the API documentation.
I used your branch to understand the behavior, but I didn't used the code by itself.

I saw that you implemented a retry mechanism but I didn't implemented a retry because I need to understand why we need that to propose the right implementation.

@ldez ldez closed this Nov 13, 2026
@ldez ldez reopened this Nov 13, 2026
@fr6nco

fr6nco commented Nov 13, 2026 •

Copy link
Copy Markdown

Hi @ldez

created a PR to your branch. There was one bug where when there are existing DNSRecords the provider treats it as update, even though the challenge was not present yet.

I removed the optional resourceVersion field from the PATCH/DELETE requests. I'll update the swagger API so it is clear that the parameter is not required. It is noted on the PATCH request, but not marked as optional on the DELETE path. these are optional as per the swagger api

The API is on top of Kubernetes, so in theory a reconciler could update the resource, which would change the resourceVersion. If the resourceVersion is omitted, the request takes precedence even if the resource changed underneath.

 lego git:(feat/dns/edgecdnx) ./dist/lego run --dns edgecdnx -d '*.tbotech.sk' -d tbotech.sk -s letsencrypt-staging
2026-11-13T23:37:29.880878000+01:00 INFO  Private key saved. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/accounts/acme-staging-v02.api.letsencrypt.org/noemail@example.com/noemail@example.com.key
2026-11-13T23:37:30.430703000+01:00 WARN  Please review the TOS. url=https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf
Do you accept the TOS? Y/n
y
2026-11-13T23:37:38.818459000+01:00 WARN  !!!! HEADS UP !!!!

Your account credentials have been saved in your
configuration directory at "/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/accounts".

You should make a secure backup of this folder now. This
configuration directory will also contain private keys
generated by lego and certificates obtained from the ACME
server. Making regular backups of this folder is ideal.

2026-11-13T23:37:38.819364000+01:00 INFO  Obtaining bundled SAN certificate. domains="*.tbotech.sk, tbotech.sk"
2026-11-13T23:37:39.554194000+01:00 INFO  Use solver. domain=*.tbotech.sk type=dns-01
2026-11-13T23:37:39.554276000+01:00 INFO  Use solver. domain=tbotech.sk type=dns-01
2026-11-13T23:37:39.554368000+01:00 INFO  dns01: preparing to solve the challenge. domain=*.tbotech.sk
2026-11-13T23:37:40.520229000+01:00 INFO  dns01: preparing to solve the challenge. domain=tbotech.sk
2026-11-13T23:37:40.918132000+01:00 INFO  dns01: trying to solve the challenge. domain=*.tbotech.sk
2026-11-13T23:37:40.954886000+01:00 INFO  dns01: waiting for record propagation timeout=1m0s interval=2s domain=*.tbotech.sk
2026-11-13T23:37:48.103641000+01:00 INFO  The server validated our request. domain=*.tbotech.sk
2026-11-13T23:37:48.103703000+01:00 INFO  dns01: trying to solve the challenge. domain=tbotech.sk
2026-11-13T23:37:48.131421000+01:00 INFO  dns01: waiting for record propagation timeout=1m0s interval=2s domain=tbotech.sk
2026-11-13T23:37:54.279130000+01:00 INFO  The server validated our request. domain=tbotech.sk
2026-11-13T23:37:54.279219000+01:00 INFO  dns01: cleaning DNS-01 challenge. domain=*.tbotech.sk
2026-11-13T23:37:54.785004000+01:00 INFO  dns01: cleaning DNS-01 challenge. domain=tbotech.sk
2026-11-13T23:37:55.397178000+01:00 INFO  Validations succeeded; requesting certificates. domains="*.tbotech.sk, tbotech.sk"
2026-11-13T23:37:55.595129000+01:00 INFO  Waiting for certificates. timeout=30s interval=500ms domains="*.tbotech.sk, tbotech.sk"
2026-11-13T23:37:57.693331000+01:00 INFO  Server responded with a certificate. domains="*.tbotech.sk, tbotech.sk"
2026-11-13T23:37:57.693687000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.crt
2026-11-13T23:37:57.694007000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.issuer.crt
2026-11-13T23:37:57.694215000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.key
2026-11-13T23:37:57.694431000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.json

ldez#5

@ldez

ldez commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

I updated the PR based on your suggestions.

Could you check if this is still working?

@fr6nco

fr6nco commented Nov 13, 2026

Copy link
Copy Markdown

yes, working:

➜  lego git:(feat/dns/edgecdnx) git --no-pager log -1
commit 85f857357325e9f19e51dbb033a2981317a8fd43 (HEAD -> feat/dns/edgecdnx, origin/feat/dns/edgecdnx)
Author: Fernandez Ludovic <ldez@users.noreply.github.com>
Date:   Fri Nov 13 23:48:00 2026 +0100

    review
➜  lego git:(feat/dns/edgecdnx) ./dist/lego run --dns edgecdnx -d '*.tbotech.sk' -d tbotech.sk -s letsencrypt-staging
2026-11-14T00:06:53.011296000+01:00 INFO  Private key saved. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/accounts/acme-staging-v02.api.letsencrypt.org/noemail@example.com/noemail@example.com.key
2026-11-14T00:06:53.542607000+01:00 WARN  Please review the TOS. url=https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf
Do you accept the TOS? Y/n
y
2026-11-14T00:06:55.958236000+01:00 WARN  !!!! HEADS UP !!!!

Your account credentials have been saved in your
configuration directory at "/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/accounts".

You should make a secure backup of this folder now. This
configuration directory will also contain private keys
generated by lego and certificates obtained from the ACME
server. Making regular backups of this folder is ideal.

2026-11-14T00:06:55.959148000+01:00 INFO  Obtaining bundled SAN certificate. domains="*.tbotech.sk, tbotech.sk"
2026-11-14T00:06:56.805071000+01:00 INFO  Use solver. domain=*.tbotech.sk type=dns-01
2026-11-14T00:06:56.805148000+01:00 INFO  Use solver. domain=tbotech.sk type=dns-01
2026-11-14T00:06:56.805208000+01:00 INFO  dns01: preparing to solve the challenge. domain=*.tbotech.sk
2026-11-14T00:06:57.669077000+01:00 INFO  dns01: preparing to solve the challenge. domain=tbotech.sk
2026-11-14T00:06:58.207099000+01:00 INFO  dns01: trying to solve the challenge. domain=*.tbotech.sk
2026-11-14T00:06:58.243541000+01:00 INFO  dns01: waiting for record propagation timeout=1m0s interval=2s domain=*.tbotech.sk
2026-11-14T00:07:00.285025000+01:00 INFO  dns01: waiting for record propagation. domain=*.tbotech.sk
2026-11-14T00:07:02.594376000+01:00 INFO  dns01: waiting for record propagation. domain=*.tbotech.sk
2026-11-14T00:07:04.708083000+01:00 INFO  dns01: waiting for record propagation. domain=*.tbotech.sk
2026-11-14T00:07:06.799322000+01:00 INFO  dns01: waiting for record propagation. domain=*.tbotech.sk
2026-11-14T00:07:14.795280000+01:00 INFO  The server validated our request. domain=*.tbotech.sk
2026-11-14T00:07:14.795343000+01:00 INFO  dns01: trying to solve the challenge. domain=tbotech.sk
2026-11-14T00:07:14.872963000+01:00 INFO  dns01: waiting for record propagation timeout=1m0s interval=2s domain=tbotech.sk
2026-11-14T00:07:22.134974000+01:00 INFO  The server validated our request. domain=tbotech.sk
2026-11-14T00:07:22.135058000+01:00 INFO  dns01: cleaning DNS-01 challenge. domain=*.tbotech.sk
2026-11-14T00:07:22.654324000+01:00 INFO  dns01: cleaning DNS-01 challenge. domain=tbotech.sk
2026-11-14T00:07:23.017888000+01:00 INFO  Validations succeeded; requesting certificates. domains="*.tbotech.sk, tbotech.sk"
2026-11-14T00:07:23.193973000+01:00 INFO  Waiting for certificates. timeout=30s interval=500ms domains="*.tbotech.sk, tbotech.sk"
2026-11-14T00:07:25.289702000+01:00 INFO  Server responded with a certificate. domains="*.tbotech.sk, tbotech.sk"
2026-11-14T00:07:25.290232000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.crt
2026-11-14T00:07:25.290824000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.issuer.crt
2026-11-14T00:07:25.291235000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.key
2026-11-14T00:07:25.291579000+01:00 INFO  Writing file. filepath=/Users/tbo/Projects/tbotech/cdn/temp/lego/.lego/certificates/_.tbotech.sk.json

thanks

@ldez
ldez marked this pull request as ready for review November 13, 2026 23:40
@ldez

ldez commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Thank you

@ldez ldez removed waiting-for/user-tests Need users to test functionality waiting-for/contrib-feedback Awaiting feedback from the contributor. labels Nov 13, 2026
@ldez ldez added this to the unreleased-v5 milestone Nov 13, 2026
@ldez
ldez merged commit 20bf264 into go-acme:main Nov 13, 2026
13 checks passed
@ldez
ldez deleted the feat/dns/edgecdnx branch November 13, 2026 23:41
@ldez ldez modified the milestones: unreleased-v5, v5.7 Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Support for provider: EdgeCDN-X

2 participants