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

Add DNS provider for hosttech #1447

Merged
merged 3 commits into from
Jul 9, 2021
Merged

Add DNS provider for hosttech #1447

merged 3 commits into from
Jul 9, 2021

Conversation

ldez
Copy link
Member

@ldez ldez commented Jul 1, 2021

  • have a homogeneous design with the other providers
  • pass the linter
  • do go mod tidy
  • 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)
rm -rf .lego/

HOSTTECH_API_KEY=xxx ./lego -m [email protected] --dns hosttech -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run

Note the wildcard domain is important.

@RealFriesi could you test by running the previous command (you have to use a real domain and email)?

Closes #1437

@ldez ldez added enhancement area/dnsprovider state/need-user-tests Need users to test functionality labels Jul 1, 2021
@ldez ldez added this to the v4.5 milestone Jul 1, 2021
@RealFriesi
Copy link

I will test it out today as soon as I get home

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@ldez
Copy link
Member Author

ldez commented Jul 9, 2021

🤔 Maybe it's related to the Content-Type header, I updated the code, you can try again.

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@ldez

This comment has been minimized.

@RealFriesi

This comment has been minimized.

@ldez

This comment has been minimized.

@RealFriesi
Copy link

worked! awesome 👍

2021/07/09 11:02:12 No key found for account [email protected]. Generating a P256 key.
2021/07/09 11:02:12 Saved key to /root/lego/dist/.lego/accounts/acme-staging-v02.api.letsencrypt.org/[email protected]/keys/[email protected]
2021/07/09 11:02:13 Please review the TOS at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Do you accept the TOS? Y/n
Y
2021/07/09 11:02:16 [INFO] acme: Registering account for [email protected]
!!!! HEADS UP !!!!

Your account credentials have been saved in your Let's Encrypt
configuration directory at "/root/lego/dist/.lego/accounts".

You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
2021/07/09 11:02:16 [INFO] [*.domain.com, domain.com] acme: Obtaining bundled SAN certificate
2021/07/09 11:02:17 [INFO] [*.domain.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/85422045
2021/07/09 11:02:17 [INFO] [domain.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/85422047
2021/07/09 11:02:17 [INFO] [*.domain.com] acme: use dns-01 solver
2021/07/09 11:02:17 [INFO] [domain.com] acme: Could not find solver for: tls-alpn-01
2021/07/09 11:02:17 [INFO] [domain.com] acme: Could not find solver for: http-01
2021/07/09 11:02:17 [INFO] [domain.com] acme: use dns-01 solver
2021/07/09 11:02:17 [INFO] [*.domain.com] acme: Preparing to solve DNS-01
2021/07/09 11:02:17 GetZone: https://api.ns1.hosttech.eu/api/user/v1/zones/domain.com: %!s(MISSING)
2021/07/09 11:02:17 AddRecord: https://api.ns1.hosttech.eu/api/user/v1/zones/274860/records: {"type":"TXT","name":"_acme-challenge","text":"-o6D8Cu2P7dMEUrwOUGerZKI01bD4yqMTCLbgboSAfU","ttl":3600}
2021/07/09 11:02:18 [INFO] [domain.com] acme: Preparing to solve DNS-01
2021/07/09 11:02:18 GetZone: https://api.ns1.hosttech.eu/api/user/v1/zones/domain.com: %!s(MISSING)
2021/07/09 11:02:18 AddRecord: https://api.ns1.hosttech.eu/api/user/v1/zones/274860/records: {"type":"TXT","name":"_acme-challenge","text":"XNxThWanT4sxWSFF9Kq9F7eLNhD26g_ppMNiIA-izhw","ttl":3600}
2021/07/09 11:02:18 [INFO] [*.domain.com] acme: Trying to solve DNS-01
2021/07/09 11:02:18 [INFO] [*.domain.com] acme: Checking DNS record propagation using [127.0.0.53:53]
2021/07/09 11:02:20 [INFO] Wait for propagation [timeout: 1m0s, interval: 2s]
2021/07/09 11:02:20 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:22 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:24 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:26 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:28 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:30 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:32 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:34 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:36 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:38 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:40 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:42 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:44 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:46 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:48 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:50 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:52 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:54 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:56 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:02:58 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:03:00 [INFO] [*.domain.com] acme: Waiting for DNS record propagation.
2021/07/09 11:03:10 [INFO] [*.domain.com] The server validated our request
2021/07/09 11:03:10 [INFO] [domain.com] acme: Trying to solve DNS-01
2021/07/09 11:03:10 [INFO] [domain.com] acme: Checking DNS record propagation using [127.0.0.53:53]
2021/07/09 11:03:12 [INFO] Wait for propagation [timeout: 1m0s, interval: 2s]
2021/07/09 11:03:19 [INFO] [domain.com] The server validated our request
2021/07/09 11:03:19 [INFO] [*.domain.com] acme: Cleaning DNS-01 challenge
2021/07/09 11:03:19 GetZone: https://api.ns1.hosttech.eu/api/user/v1/zones/domain.com: %!s(MISSING)
2021/07/09 11:03:19 DeleteRecord: https://api.ns1.hosttech.eu/api/user/v1/zones/274860/records/2111630
2021/07/09 11:03:19 [INFO] [domain.com] acme: Cleaning DNS-01 challenge
2021/07/09 11:03:19 GetZone: https://api.ns1.hosttech.eu/api/user/v1/zones/domain.com: %!s(MISSING)
2021/07/09 11:03:19 DeleteRecord: https://api.ns1.hosttech.eu/api/user/v1/zones/274860/records/2111631
2021/07/09 11:03:20 [INFO] [*.domain.com, domain.com] acme: Validations succeeded; requesting certificates
2021/07/09 11:03:21 [INFO] [*.domain.com] Server responded with a certificate.

- improve errors
- init record ids map
@ldez ldez removed the state/need-user-tests Need users to test functionality label Jul 9, 2021
@ldez ldez requested a review from dmke July 9, 2021 11:16
@ldez ldez merged commit 264d39b into go-acme:master Jul 9, 2021
@ldez ldez deleted the feat/hosttech branch July 9, 2021 20:50
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: Hosttech
3 participants