-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 nicmanager #1473
Conversation
Hello, in order for a PR adding a DNS provider to be accepted, you have to:
make test
make test
make generate-dns
rm -rf .lego
./lego -m your@email.com --dns YOUR_PROVIDER_NAME -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run Note the wildcard domain is important.
make checks
|
Not quite sure what you mean by that
Generate with wildcard (substituted the domain I tested with for example.com): ❯ rm -rf .leg
wks jens in ~/lego on ﴱ beryjuorg-prd (authentik)
❯ bash -x test.sh
+ export NICMANAGER_API_EMAIL=jens@beryju.org
+ NICMANAGER_API_EMAIL=jens@beryju.org
+ export 'NICMANAGER_API_PASSWORD=xxxxxxxxxxx'
+ NICMANAGER_API_PASSWORD='xxxxxxxxxxx'
+ export NICMANAGER_API_OTP=xxxxxxxxxxxx
+ NICMANAGER_API_OTP=xxxxxxxxxxxx
+ ./main --dns.resolvers 8.8.8.8:53 --server=https://acme-staging-v02.api.letsencrypt.org/directory --dns nicmanager --email jens.langhammer@haufe-lexware.co--domains '*.example.com' --domains example.com run
2021/08/26 12:06:25 No key found for account jens@beryju.org. Generating a P256 key.
2021/08/26 12:06:25 Saved key to /home/jens/lego/.lego/accounts/acme-staging-v02.api.letsencrypt.org/jens@beryju.org/keys/jens@beryju.org.key
2021/08/26 12:06:25 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/08/26 12:06:38 [INFO] acme: Registering account for jens@beryju.org
!!!! HEADS UP !!!
Your account credentials have been saved in your Let's Encrypt
configuration directory at "/home/jens/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 Let's Encrypt so making regular
backups of this folder is ideal.
2021/08/26 12:06:38 [INFO] [*.example.com, example.com] acme: Obtaining bundled SAN certificate
2021/08/26 12:06:39 [INFO] [*.example.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/361009418
2021/08/26 12:06:39 [INFO] [example.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/361009428
2021/08/26 12:06:39 [INFO] [*.example.com] acme: use dns-01 solver
2021/08/26 12:06:39 [INFO] [example.com] acme: Could not find solver for: tls-alpn-01
2021/08/26 12:06:39 [INFO] [example.com] acme: Could not find solver for: http-01
2021/08/26 12:06:39 [INFO] [example.com] acme: use dns-01 solver
2021/08/26 12:06:39 [INFO] [*.example.com] acme: Preparing to solve DNS-01
2021/08/26 12:06:39 [INFO] Create a new record for [zone: example.com, fqdn: _acme-challenge.example.com., domain: example.com]
2021/08/26 12:06:40 [INFO] [example.com] acme: Preparing to solve DNS-01
2021/08/26 12:06:40 [INFO] Create a new record for [zone: example.com, fqdn: _acme-challenge.example.com., domain: example.com]
2021/08/26 12:06:40 [INFO] [*.example.com] acme: Trying to solve DNS-01
2021/08/26 12:06:40 [INFO] [*.example.com] acme: Checking DNS record propagation using [8.8.8.8:53]
2021/08/26 12:06:42 [INFO] Wait for propagation [timeout: 5m0s, interval: 2s]
2021/08/26 12:06:42 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:44 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:46 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:48 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:50 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:52 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:54 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:56 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:06:58 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:00 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:02 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:04 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:07 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:09 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:11 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:13 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:15 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:17 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:19 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:21 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:23 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:25 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:27 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:29 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:31 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:33 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:35 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:37 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:39 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:41 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:43 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:45 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:47 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:49 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:51 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:53 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:55 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:57 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:07:59 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:01 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:03 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:05 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:07 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:09 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:11 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:13 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:15 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:17 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:19 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:22 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:24 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:26 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:28 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:30 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:32 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:34 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:36 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:38 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:40 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:42 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:44 [INFO] [*.example.com] acme: Waiting for DNS record propagation.
2021/08/26 12:08:52 [INFO] [*.example.com] The server validated our request
2021/08/26 12:08:52 [INFO] [example.com] acme: Trying to solve DNS-01
2021/08/26 12:08:52 [INFO] [example.com] acme: Checking DNS record propagation using [8.8.8.8:53]
2021/08/26 12:08:54 [INFO] Wait for propagation [timeout: 5m0s, interval: 2s]
2021/08/26 12:09:01 [INFO] [example.com] The server validated our request
2021/08/26 12:09:01 [INFO] [*.example.com] acme: Cleaning DNS-01 challenge
2021/08/26 12:09:02 [WARN] [*.example.com] acme: cleaning up failed: nicmanager: no record found to cleanup
2021/08/26 12:09:02 [INFO] [example.com] acme: Cleaning DNS-01 challenge
2021/08/26 12:09:02 [WARN] [example.com] acme: cleaning up failed: nicmanager: no record found to cleanup
2021/08/26 12:09:02 [INFO] [*.example.com, example.com] acme: Validations succeeded; requesting certificates
2021/08/26 12:09:03 [INFO] [*.example.com] Server responded with a certificate
wks jens in ~/lego on ﴱ beryjuorg-prd (authentik) |
Offtopic |
My bad, I was hoping that when I create the PR as a draft it wouldn't do that |
dns/nicmanager: fix loading of env dns/nicmanager: allow selection of mode (anycast/zone) and fix zone lookup dns/nicmanager: fix missing Accept header dns/nicmanager: fix password not being loaded, missing content type dns/nicmanager: minimum allowed ttl is 900 dns/nicmanager: add generated files dns/nicmanager: linting pass dns/nicmanager: use correct http client dns/nicmanager: bump default propagation timeout dns/nicmanager: fix cleanup not working, check value of record dns/nicmanager: always create record and don't update dns/nicmanager: add additional checks for username, add basic tests dns/nicmanager: add full unittests, squash commits
Are you a customer or a member of nicmanager? |
I am a customer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
This PR adds support for https://www.nicmanager.com/ which is a german DNS Provider.
API Documentation can be found here https://api.nicmanager.com/docs/v1/
This provider offers both "Anycast" and "FreeDNS", both of which have the same API, just on a different path.