Skip to content

Add DNS provider for Binary Lane #2624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 21, 2025
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Aug 21, 2025

  • adds a description to your PR
  • have a homogeneous design with the other providers
  • add tests (units)
  • add tests ("live")
  • add a provider descriptor
  • generate CLI help, documentation, and readme.
  • be able to do: (and put the output of this command to a comment)
    make build
    rm -rf .lego
    
    BINARYLANE_API_TOKEN=xxx \
    lego --email [email protected] --dns binarylane -d '*.example.com' -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run
    Note that the wildcard domain is important.
  • pass the linter
  • do go mod tidy

Ping @aristaeus, can you run the command (with your domain, email, credentials, etc.)?

Closes #2623

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/binarylane
  3. Compile lego:
    • if you have make: make build
    • if you don't make make: go build -o dist/lego ./cmd/lego
  4. Run the following command with your information (email, domain, credentials):
    BINARYLANE_API_TOKEN=xxx \
    lego --email [email protected] --dns binarylane -d '*.example.com' -d example.com  -s https://acme-staging-v02.api.letsencrypt.org/directory run
    The wildcard domain is important
  5. Before each run of the command, you should clean your local environment:
    rm -rf .lego

@ldez ldez force-pushed the feat/dns/binarylane branch from 87fa67b to a7ad06e Compare August 21, 2025 04:54
@aristaeus
Copy link

I'm getting the following error: acme: error presenting token: binarylane: create record: 400: https://tools.ietf.org/html/rfc7231#section-6.5.1: One or more validation errors occurred: : : : The default TTL of 3600 may not be changed.

I've tried setting the TTL environment variable and changing the code but that just makes things worse: panic: assignment to entry in nil map

@aristaeus
Copy link

aristaeus commented Aug 21, 2025

Thanks for the quick fix, it's working now!

2025/08/21 15:33:14 No key found for account [email protected]. Generating a P256 key.
2025/08/21 15:33:14 Saved key to /Users/benharper/tmp/lego/.lego/accounts/acme-staging-v02.api.letsencrypt.org/[email protected]/keys/[email protected]
2025/08/21 15:33:15 Please review the TOS at https://letsencrypt.org/documents/LE-SA-v1.5-February-24-2025.pdf
Do you accept the TOS? Y/n
y
2025/08/21 15:33:16 [INFO] acme: Registering account for [email protected]
!!!! HEADS UP !!!!

Your account credentials have been saved in your
configuration directory at "/Users/benharper/tmp/lego/.lego/accounts".

You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from the ACME server so making regular
backups of this folder is ideal.
2025/08/21 15:33:17 [INFO] [*.mydomain.com, mydomain.com] acme: Obtaining bundled SAN certificate
2025/08/21 15:33:18 [INFO] [*.mydomain.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz/222333564/19022242484
2025/08/21 15:33:18 [INFO] [mydomain.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz/222333564/19022242494
2025/08/21 15:33:18 [INFO] [*.mydomain.com] acme: use dns-01 solver
2025/08/21 15:33:18 [INFO] [mydomain.com] acme: Could not find solver for: tls-alpn-01
2025/08/21 15:33:18 [INFO] [mydomain.com] acme: Could not find solver for: http-01
2025/08/21 15:33:18 [INFO] [mydomain.com] acme: use dns-01 solver
2025/08/21 15:33:18 [INFO] [*.mydomain.com] acme: Preparing to solve DNS-01
2025/08/21 15:33:18 [INFO] [mydomain.com] acme: Preparing to solve DNS-01
2025/08/21 15:33:18 [INFO] [*.mydomain.com] acme: Trying to solve DNS-01
2025/08/21 15:33:18 [INFO] [*.mydomain.com] acme: Checking DNS record propagation. [nameservers=128.250.66.5:53,128.250.201.5:53]
2025/08/21 15:33:20 [INFO] Wait for propagation [timeout: 1m0s, interval: 2s]
2025/08/21 15:33:21 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:23 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:25 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:27 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:31 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:33 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:35 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:37 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:39 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:42 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:44 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:46 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:48 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:55 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:33:57 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:34:00 [INFO] [*.mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:34:11 [INFO] [*.mydomain.com] The server validated our request
2025/08/21 15:34:11 [INFO] [mydomain.com] acme: Trying to solve DNS-01
2025/08/21 15:34:11 [INFO] [mydomain.com] acme: Checking DNS record propagation. [nameservers=128.250.66.5:53,128.250.201.5:53]
2025/08/21 15:34:13 [INFO] Wait for propagation [timeout: 1m0s, interval: 2s]
2025/08/21 15:34:13 [INFO] [mydomain.com] acme: Waiting for DNS record propagation.
2025/08/21 15:34:21 [INFO] [mydomain.com] The server validated our request
2025/08/21 15:34:21 [INFO] [*.mydomain.com] acme: Cleaning DNS-01 challenge
2025/08/21 15:34:21 [INFO] [mydomain.com] acme: Cleaning DNS-01 challenge
2025/08/21 15:34:21 [INFO] [*.mydomain.com, mydomain.com] acme: Validations succeeded; requesting certificates
2025/08/21 15:34:21 [INFO] Wait for certificate [timeout: 30s, interval: 500ms]
2025/08/21 15:34:22 [INFO] [*.mydomain.com] Server responded with a certificate.

@ldez ldez removed state/need-user-tests Need users to test functionality contrib/waiting-for-feedback labels Aug 21, 2025
@ldez ldez added this to the unreleased milestone Aug 21, 2025
@ldez ldez requested a review from dmke August 21, 2025 05:57
@ldez ldez marked this pull request as ready for review August 21, 2025 05:58
@ldez ldez merged commit 50a24ce into go-acme:master Aug 21, 2025
7 checks passed
@ldez ldez deleted the feat/dns/binarylane branch August 21, 2025 11:19
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: Binary Lane
3 participants