certbot-dns-nicmanager 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. certbot_dns_nicmanager-1.0.0/CHANGELOG.md +60 -0
  2. certbot_dns_nicmanager-1.0.0/LICENSE.txt +202 -0
  3. certbot_dns_nicmanager-1.0.0/MANIFEST.in +7 -0
  4. certbot_dns_nicmanager-1.0.0/NOTICE +8 -0
  5. certbot_dns_nicmanager-1.0.0/PKG-INFO +226 -0
  6. certbot_dns_nicmanager-1.0.0/README.md +179 -0
  7. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager/__init__.py +94 -0
  8. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager/_internal/__init__.py +1 -0
  9. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager/_internal/dns_nicmanager.py +295 -0
  10. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager/py.typed +0 -0
  11. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/PKG-INFO +226 -0
  12. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/SOURCES.txt +23 -0
  13. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/dependency_links.txt +1 -0
  14. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/entry_points.txt +2 -0
  15. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/requires.txt +14 -0
  16. certbot_dns_nicmanager-1.0.0/certbot_dns_nicmanager.egg-info/top_level.txt +1 -0
  17. certbot_dns_nicmanager-1.0.0/docs/ARCHITECTURE.md +229 -0
  18. certbot_dns_nicmanager-1.0.0/docs/TROUBLESHOOTING.md +114 -0
  19. certbot_dns_nicmanager-1.0.0/docs/decisions/ADR-001-dns-01-challenge-only.md +59 -0
  20. certbot_dns_nicmanager-1.0.0/docs/decisions/ADR-002-zone-resolution-without-zone-reads.md +92 -0
  21. certbot_dns_nicmanager-1.0.0/docs/decisions/ADR-003-basic-auth-username-and-cleanup-by-id.md +114 -0
  22. certbot_dns_nicmanager-1.0.0/examples/nicmanager.ini +22 -0
  23. certbot_dns_nicmanager-1.0.0/pyproject.toml +84 -0
  24. certbot_dns_nicmanager-1.0.0/setup.cfg +4 -0
  25. certbot_dns_nicmanager-1.0.0/tests/test_dns_nicmanager.py +205 -0
@@ -0,0 +1,60 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2026-06-16
11
+
12
+ First stable release. The plugin has been validated in production against the
13
+ live nicmanager AnycastDNS API (wildcard issuance for 8 domains, with automatic
14
+ renewal via certbot's systemd timer).
15
+
16
+ ### Added
17
+ - `docs/ARCHITECTURE.md` and Architecture Decision Records
18
+ (`docs/decisions/ADR-001..003`) documenting the design.
19
+ - `docs/TROUBLESHOOTING.md` with the real-world nicmanager API status decoder
20
+ (401 vs 403 vs rate-limit vs firewall block) and authentication notes.
21
+ - Automated PyPI publishing via GitHub Actions Trusted Publishing (OIDC).
22
+
23
+ ### Notes
24
+ - The basic-auth **username must match the account's active authentication
25
+ method**: the account **email** for "E-Mail + Passwort" accounts, or
26
+ `login.username` otherwise. The wrong form returns `401` even with the correct
27
+ password. 2FA must be disabled on the automation account.
28
+
29
+ ## [0.2.0] - 2026-06-14
30
+
31
+ ### Changed
32
+ - **Zone detection no longer reads zones.** A restricted API-ACME account cannot
33
+ read zone metadata (`GET /anycast/{zone}` returns 401/403), so the owning zone
34
+ is now found by attempting the record *create* against each candidate zone
35
+ (most-specific first) and using the first that succeeds. A `403`/`404` skips to
36
+ the next candidate; a `401` (genuine auth failure) is never swallowed.
37
+ - Cleanup now deletes strictly by the record id captured at creation and makes no
38
+ `GET` request when no id is stored (the restricted account cannot list records).
39
+
40
+ ### Notes
41
+ - If the credentials password contains `#`, quote it in the INI
42
+ (`dns_nicmanager_password = "..."`) — the INI parser treats an unquoted `#` as
43
+ a comment.
44
+
45
+ ## [0.1.0] - 2026-06-14
46
+
47
+ ### Added
48
+ - Initial release.
49
+ - Certbot `dns-01` authenticator (`dns-nicmanager`) for the nicmanager AnycastDNS
50
+ API.
51
+ - Automatic zone detection with an optional `dns_nicmanager_zone` override.
52
+ - Tolerates locked-down API-ACME accounts that cannot read zone metadata.
53
+ - Cleanup deletes the challenge record by the numeric id returned at creation,
54
+ with a name/content lookup fallback.
55
+ - Test suite covering create, delete, zone walking, and API error handling.
56
+
57
+ [Unreleased]: https://github.com/jp1337/certbot-dns-nicmanager/compare/v1.0.0...HEAD
58
+ [1.0.0]: https://github.com/jp1337/certbot-dns-nicmanager/compare/v0.2.0...v1.0.0
59
+ [0.2.0]: https://github.com/jp1337/certbot-dns-nicmanager/compare/v0.1.0...v0.2.0
60
+ [0.1.0]: https://github.com/jp1337/certbot-dns-nicmanager/releases/tag/v0.1.0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ include README.md
2
+ include CHANGELOG.md
3
+ include LICENSE.txt
4
+ include certbot_dns_nicmanager/py.typed
5
+ recursive-include examples *.ini
6
+ recursive-include tests *.py
7
+ recursive-include docs *.md
@@ -0,0 +1,8 @@
1
+ certbot-dns-nicmanager
2
+ Copyright 2026 Jochen Pylypiw
3
+
4
+ This product includes software developed as an independent, community-maintained
5
+ Certbot DNS plugin for the nicmanager AnycastDNS API.
6
+
7
+ It is not affiliated with or endorsed by InterNexum GmbH / nicmanager, nor by the
8
+ Electronic Frontier Foundation / the Certbot project.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: certbot-dns-nicmanager
3
+ Version: 1.0.0
4
+ Summary: nicmanager AnycastDNS Authenticator plugin for Certbot
5
+ Author: Jochen Pylypiw
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/jp1337/certbot-dns-nicmanager
8
+ Project-URL: Repository, https://github.com/jp1337/certbot-dns-nicmanager
9
+ Project-URL: Issues, https://github.com/jp1337/certbot-dns-nicmanager/issues
10
+ Project-URL: Changelog, https://github.com/jp1337/certbot-dns-nicmanager/blob/main/CHANGELOG.md
11
+ Keywords: certbot,letsencrypt,acme,dns-01,nicmanager,dns
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Plugins
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Internet :: WWW/HTTP
25
+ Classifier: Topic :: Security
26
+ Classifier: Topic :: System :: Installation/Setup
27
+ Classifier: Topic :: System :: Networking
28
+ Classifier: Topic :: System :: Systems Administration
29
+ Classifier: Topic :: Utilities
30
+ Requires-Python: >=3.10
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE.txt
33
+ License-File: NOTICE
34
+ Requires-Dist: certbot>=2.0.0
35
+ Requires-Dist: requests>=2.20.0
36
+ Provides-Extra: test
37
+ Requires-Dist: pytest>=7.0; extra == "test"
38
+ Requires-Dist: pytest-cov; extra == "test"
39
+ Requires-Dist: requests-mock; extra == "test"
40
+ Provides-Extra: dev
41
+ Requires-Dist: build; extra == "dev"
42
+ Requires-Dist: twine; extra == "dev"
43
+ Requires-Dist: mypy; extra == "dev"
44
+ Requires-Dist: types-requests; extra == "dev"
45
+ Requires-Dist: ruff; extra == "dev"
46
+ Dynamic: license-file
47
+
48
+ # certbot-dns-nicmanager
49
+
50
+ [![CI](https://github.com/jp1337/certbot-dns-nicmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/jp1337/certbot-dns-nicmanager/actions/workflows/ci.yml)
51
+ [![PyPI](https://img.shields.io/pypi/v/certbot-dns-nicmanager.svg)](https://pypi.org/project/certbot-dns-nicmanager/)
52
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE.txt)
53
+
54
+ > **Status:** stable (1.0). Running in production — wildcard issuance + automatic
55
+ > renewal against the live nicmanager AnycastDNS API.
56
+
57
+ A [Certbot](https://certbot.eff.org/) DNS authenticator plugin for
58
+ [nicmanager](https://www.nicmanager.com/) **AnycastDNS**. It automates the
59
+ `dns-01` ACME challenge by creating, and then removing, the
60
+ `_acme-challenge` TXT record through the
61
+ [nicmanager API](https://api.nicmanager.com/docs/v1/) — which makes it possible
62
+ to issue **wildcard certificates** for domains hosted on nicmanager.
63
+
64
+ There was no Certbot plugin for the nicmanager API, and the `lego`-based
65
+ multi-provider plugins do not yet support nicmanager's current API. This plugin
66
+ fills that gap with a small, dependency-light, well-tested implementation.
67
+
68
+ ## Why DNS-01 (and not HTTP-01)?
69
+
70
+ `dns-01` is the only ACME challenge type that can issue **wildcard**
71
+ certificates, and it does not require any inbound HTTP reachability. It also
72
+ keeps your individual service hostnames out of the public
73
+ [Certificate Transparency](https://certificate.transparency.dev/) logs that a
74
+ per-host `http-01` certificate would expose.
75
+
76
+ ## Installation
77
+
78
+ ```bash
79
+ pip install certbot-dns-nicmanager
80
+ ```
81
+
82
+ > Install the plugin into the **same** Python environment as Certbot. If you
83
+ > installed Certbot via `snap`, install the plugin with
84
+ > `snap install certbot-dns-nicmanager` once it is published there, or run
85
+ > Certbot from a `pip` environment that contains both packages.
86
+
87
+ Verify it is registered:
88
+
89
+ ```bash
90
+ certbot plugins
91
+ # ... should list: * dns-nicmanager
92
+ ```
93
+
94
+ ## Credentials
95
+
96
+ This plugin authenticates against the nicmanager API with HTTP Basic auth.
97
+ The strongly recommended setup is a dedicated **API-ACME account**, which
98
+ nicmanager restricts to managing only the `_acme-challenge.<zone>` TXT record:
99
+
100
+ | Module | Rights |
101
+ | ---------------- | --------------------------------------- |
102
+ | Webfrontend | – |
103
+ | Account settings | – |
104
+ | Domains | – |
105
+ | Nameserver | View, Manage (create, edit, delete) |
106
+ | Domainsecurity | – |
107
+ | Other modules | – |
108
+
109
+ Because such an account can touch nothing but the challenge record, a leaked
110
+ credential cannot be used to hijack other records, transfer domains, or read
111
+ account data. **Disable two-factor authentication** on the account used for
112
+ automation — the API would otherwise require a rotating TOTP code that cannot be
113
+ provided unattended.
114
+
115
+ Create an INI file, e.g. `~/.secrets/certbot/nicmanager.ini`:
116
+
117
+ ```ini
118
+ # nicmanager API credentials used by Certbot
119
+ dns_nicmanager_username = mylogin.acmeuser
120
+ # Quote the password if it contains '#' — an unquoted '#' starts an INI comment.
121
+ dns_nicmanager_password = "0123456789abcdef0123456789abcdef"
122
+
123
+ # Optional. Defaults to https://api.nicmanager.com/v1
124
+ # dns_nicmanager_endpoint = https://api.nicmanager.com/v1
125
+
126
+ # Optional. Skip zone detection and always use this zone.
127
+ # dns_nicmanager_zone = example.com
128
+ ```
129
+
130
+ The `username` is `login.username` (or the account email). Zone detection works
131
+ without any read access, so `dns_nicmanager_zone` is only needed in unusual
132
+ multi-zone-suffix setups.
133
+
134
+ The `username` is either `login.username` or the account email address, as
135
+ configured in nicmanager.
136
+
137
+ Protect this file:
138
+
139
+ ```bash
140
+ chmod 600 ~/.secrets/certbot/nicmanager.ini
141
+ ```
142
+
143
+ ## Usage
144
+
145
+ ```bash
146
+ # A single hostname
147
+ certbot certonly \
148
+ --authenticator dns-nicmanager \
149
+ --dns-nicmanager-credentials ~/.secrets/certbot/nicmanager.ini \
150
+ -d example.com
151
+
152
+ # A wildcard (and the apex)
153
+ certbot certonly \
154
+ --authenticator dns-nicmanager \
155
+ --dns-nicmanager-credentials ~/.secrets/certbot/nicmanager.ini \
156
+ -d 'example.com' -d '*.example.com'
157
+ ```
158
+
159
+ ### Command-line arguments
160
+
161
+ | Argument | Description | Default |
162
+ | --------------------------------------- | --------------------------------------------------------------------------- | ------- |
163
+ | `--dns-nicmanager-credentials` | Path to the nicmanager credentials INI file. **(required)** | – |
164
+ | `--dns-nicmanager-propagation-seconds` | Seconds to wait for DNS propagation before the ACME server checks the record. | `60` |
165
+
166
+ ## How it works
167
+
168
+ 1. Certbot asks the plugin to create `_acme-challenge.<domain>` with the
169
+ validation token.
170
+ 2. The plugin determines the owning AnycastDNS zone **without reading it** — a
171
+ restricted API-ACME account cannot read zones. It tries
172
+ `POST /v1/anycast/<candidate>/records` against each candidate zone
173
+ (most-specific first); a `403`/`404` skips to the next candidate, the first
174
+ `2xx` wins. An explicit `dns_nicmanager_zone` short-circuits this. A `401`
175
+ (genuine auth failure) is surfaced immediately.
176
+ 3. nicmanager returns the new record's numeric `id`, which the plugin
177
+ remembers.
178
+ 4. After validation, the plugin removes the record via
179
+ `DELETE /v1/anycast/<zone>/records/<id>`.
180
+
181
+ TTL is fixed at the API minimum of **900 seconds**.
182
+
183
+ > **Heads-up:** the API blocks the IP after too many failed logins. Make sure
184
+ > the password is correct (and any `#` in it is quoted in the INI, see below)
185
+ > before running at scale.
186
+
187
+ ## Troubleshooting
188
+
189
+ Common failures, decoded (full details in
190
+ [`docs/TROUBLESHOOTING.md`](docs/TROUBLESHOOTING.md)):
191
+
192
+ | Response | Meaning | Fix |
193
+ | --- | --- | --- |
194
+ | `401 Authentication error` | Wrong username form or password | Match the username to the account's auth method: **email** for "E-Mail + Passwort" accounts, `login.username` otherwise. Disable 2FA. |
195
+ | `403 API usage not allowed` | Auth OK — API access not enabled | Ask nicmanager support to enable API access for the account. |
196
+ | `401 Too many invalid attempts` / no response (`000`) | IP rate-limited / firewall-blocked after failed logins | Stop and wait. **Never** loop over credential variants — it locks the IP. |
197
+
198
+ Key gotchas: the username form depends on the account's **active authentication
199
+ method** (email vs `login.username`); **2FA must be off**; a `#` in the password
200
+ must be **quoted** in the INI; and the restricted API-ACME account **cannot read
201
+ zones** (this plugin resolves the zone by create-attempt instead).
202
+
203
+ ## Development
204
+
205
+ ```bash
206
+ git clone https://github.com/jp1337/certbot-dns-nicmanager
207
+ cd certbot-dns-nicmanager
208
+ python -m venv .venv && . .venv/bin/activate
209
+ pip install -e '.[test,dev]'
210
+
211
+ pytest # run the test suite
212
+ ruff check . # lint
213
+ mypy certbot_dns_nicmanager
214
+ ```
215
+
216
+ For the design and the reasoning behind it, see
217
+ [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) and the Architecture Decision
218
+ Records in [`docs/decisions/`](docs/decisions/) (DNS-01-only, zone resolution
219
+ without zone reads, and the basic-auth username / cleanup-by-id decisions).
220
+
221
+ ## License
222
+
223
+ [Apache License 2.0](LICENSE.txt)
224
+
225
+ This is an independent, community-maintained plugin and is not affiliated with
226
+ or endorsed by InterNexum GmbH / nicmanager or the EFF / Certbot project.