Skip to content
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

cpanel: remove custom DNS call #2102

Merged
merged 3 commits into from
Feb 6, 2024
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented Feb 6, 2024

I added this custom SOA call only to get the serial but now we use the API, so I can replace this code with our standard approach.

ping @pcastelo @seebeen

@ldez ldez added this to the v4.16 milestone Feb 6, 2024
@ldez ldez mentioned this pull request Feb 6, 2024
@ldez ldez added state/need-user-tests Need users to test functionality contrib/waiting-for-feedback labels Feb 6, 2024
@pcastelo
Copy link

pcastelo commented Feb 6, 2024

@ldez this works OK

cpanel
$` env | grep CPANEL
CPANEL_USERNAME=myuser
CPANEL_TOKEN=cpanel_token
CPANEL_BASE_URL=https://mydomain.com.ar:2083/
CPANEL_MODE=cpanel
CPANEL_PROPAGATION_TIMEOUT=120

$  ./dist/lego -m mymail@mydomain.com.ar --dns cpanel -d *.test11.mydomain.com.ar -d test11.mydomain.com.ar -s https://acme-staging-v02.api.letsencrypt.org/directory run

2024/02/06 01:37:24 [INFO] [*.test11.mydomain.com.ar, test11.mydomain.com.ar] acme: Obtaining bundled SAN certificate
2024/02/06 01:37:31 [INFO] [*.test11.mydomain.com.ar] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/
2024/02/06 01:37:31 [INFO] [test11.mydomain.com.ar] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/
2024/02/06 01:37:31 [INFO] [*.test11.mydomain.com.ar] acme: use dns-01 solver
2024/02/06 01:37:31 [INFO] [test11.mydomain.com.ar] acme: Could not find solver for: tls-alpn-01
2024/02/06 01:37:31 [INFO] [test11.mydomain.com.ar] acme: Could not find solver for: http-01
2024/02/06 01:37:31 [INFO] [test11.mydomain.com.ar] acme: use dns-01 solver
2024/02/06 01:37:31 [INFO] [*.test11.mydomain.com.ar] acme: Preparing to solve DNS-01
2024/02/06 01:37:34 [INFO] [test11.mydomain.com.ar] acme: Preparing to solve DNS-01
2024/02/06 01:37:35 [INFO] [*.test11.mydomain.com.ar] acme: Trying to solve DNS-01
2024/02/06 01:37:35 [INFO] [*.test11.mydomain.com.ar] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/02/06 01:37:37 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/02/06 01:37:37 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:40 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:42 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:44 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:47 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:49 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:51 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:54 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:56 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:37:58 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:01 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:03 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:05 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:08 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:10 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:12 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:15 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:17 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:19 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:21 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:24 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:26 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:28 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:31 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:33 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:35 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:37 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:39 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:42 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:44 [INFO] [*.test11.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:38:51 [INFO] [*.test11.mydomain.com.ar] The server validated our request
2024/02/06 01:38:51 [INFO] [test11.mydomain.com.ar] acme: Trying to solve DNS-01
2024/02/06 01:38:51 [INFO] [test11.mydomain.com.ar] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/02/06 01:38:53 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/02/06 01:39:01 [INFO] [test11.mydomain.com.ar] The server validated our request
2024/02/06 01:39:01 [INFO] [*.test11.mydomain.com.ar] acme: Cleaning DNS-01 challenge
2024/02/06 01:39:04 [INFO] [test11.mydomain.com.ar] acme: Cleaning DNS-01 challenge
2024/02/06 01:39:05 [INFO] [*.test11.mydomain.com.ar, test11.mydomain.com.ar] acme: Validations succeeded; requesting certificates
2024/02/06 01:39:06 [INFO] Wait for certificate [timeout: 30s, interval: 500ms]
2024/02/06 01:39:12 [INFO] [*.test11.mydomain.com.ar] Server responded with a certificate.

whm

$` env | grep CPANEL
CPANEL_USERNAME=myuser
CPANEL_TOKEN=whm_token
CPANEL_BASE_URL=https://mydomain.com.ar:2087/
CPANEL_MODE=whm
CPANEL_PROPAGATION_TIMEOUT=120


$  ./dist/lego -m mymail@mydomain.com.ar --dns cpanel -d *.test12.mydomain.com.ar -d test12.mydomain.com.ar -s https://acme-staging-v02.api.letsencrypt.org/directory run```

2024/02/06 01:49:39 [INFO] [*.test12.mydomain.com.ar, test12.mydomain.com.ar] acme: Obtaining bundled SAN certificate
2024/02/06 01:49:41 [INFO] [*.test12.mydomain.com.ar] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/
2024/02/06 01:49:41 [INFO] [test12.mydomain.com.ar] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/
2024/02/06 01:49:41 [INFO] [*.test12.mydomain.com.ar] acme: use dns-01 solver
2024/02/06 01:49:41 [INFO] [test12.mydomain.com.ar] acme: Could not find solver for: tls-alpn-01
2024/02/06 01:49:41 [INFO] [test12.mydomain.com.ar] acme: Could not find solver for: http-01
2024/02/06 01:49:41 [INFO] [test12.mydomain.com.ar] acme: use dns-01 solver
2024/02/06 01:49:41 [INFO] [*.test12.mydomain.com.ar] acme: Preparing to solve DNS-01
2024/02/06 01:49:44 [INFO] [test12.mydomain.com.ar] acme: Preparing to solve DNS-01
2024/02/06 01:49:45 [INFO] [*.test12.mydomain.com.ar] acme: Trying to solve DNS-01
2024/02/06 01:49:45 [INFO] [*.test12.mydomain.com.ar] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/02/06 01:49:47 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/02/06 01:49:47 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:49:50 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:49:52 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:49:55 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:49:57 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:00 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:02 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:04 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:06 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:09 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:11 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:13 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:16 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:18 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:20 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:22 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:24 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:26 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:29 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:31 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:33 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:35 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:37 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:40 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:42 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:44 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:46 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:48 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:51 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:53 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:50:55 [INFO] [*.test12.mydomain.com.ar] acme: Waiting for DNS record propagation.
2024/02/06 01:51:02 [INFO] [*.test12.mydomain.com.ar] The server validated our request
2024/02/06 01:51:02 [INFO] [test12.mydomain.com.ar] acme: Trying to solve DNS-01
2024/02/06 01:51:02 [INFO] [test12.mydomain.com.ar] acme: Checking DNS record propagation using [127.0.0.53:53]
2024/02/06 01:51:04 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/02/06 01:51:12 [INFO] [test12.mydomain.com.ar] The server validated our request
2024/02/06 01:51:12 [INFO] [*.test12.mydomain.com.ar] acme: Cleaning DNS-01 challenge
2024/02/06 01:51:14 [INFO] [test12.mydomain.com.ar] acme: Cleaning DNS-01 challenge
2024/02/06 01:51:15 [INFO] [*.test12.mydomain.com.ar, test12.mydomain.com.ar] acme: Validations succeeded; requesting certificates
2024/02/06 01:51:15 [INFO] Wait for certificate [timeout: 30s, interval: 500ms]
2024/02/06 01:51:17 [INFO] [*.test12.mydomain.com.ar] Server responded with a certificate.

note: i had to change the CPANEL_PROPAGATION_TIMEOUT in my case the midia time es 1m 20s

@ldez
Copy link
Member Author

ldez commented Feb 6, 2024

Thank you @pcastelo

@ldez ldez removed state/need-user-tests Need users to test functionality contrib/waiting-for-feedback labels Feb 6, 2024
@ldez ldez requested a review from dmke February 6, 2024 01:59
@ldez
Copy link
Member Author

ldez commented Feb 6, 2024

I increased the default timeout to 2 minutes.

@pcastelo
Copy link

pcastelo commented Feb 6, 2024

I increased the default timeout to 2 minutes.

Do you need to make another test or is this not required?

@ldez
Copy link
Member Author

ldez commented Feb 6, 2024

No test is required for this change.
Thank you again!

@ldez ldez merged commit c5a95c4 into go-acme:master Feb 6, 2024
7 checks passed
@ldez ldez deleted the feat/improve-capnel branch February 6, 2024 16:18
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.

3 participants