Adds ability to respond to dns-01 challenges from CA - #47
Open
netops2devops wants to merge 6 commits into
Open
Conversation
Introduce DNS01 challenge as an alternative to EAB for ACME account registration, supporting CAs that require EAB even with DNS01. Extract AcmeProxyConfig and certificate bundle splitting into dedicated files. Replace package-level cfgModeFlag map with useEAB/useDNS01 struct fields to eliminate cross-test state pollution. Separate challenge solver setup from account registration in createLegoClient so the two concerns are independently conditioned. Expand unit tests to cover DNS01-only, EAB-only, and both-mode validation paths, User interface methods, mixed-PEM bundle parsing, and RevokeCertificate success and error paths.
Code changes: - Rename config field `dns01` → `dns01_txt` in config.go and ca.json - Remove `metrics.enabled` field (always-on now) - Add config_test.go with unit tests for ExternalCAS config parsing - Slim down external_test.go (tests moved to config_test.go) - Add `make test` target for running externalcas tests with -race Docs changes: - Add new configuration.md page with full field reference and upstream CA URL table - Remove configuration section from install.md (now its own page) - Remove pre-built binary install method from install.md - Rewrite README and docs landing page to lead with DNS01-TXT as a supported mode alongside EAB, and add LetsEncrypt as a viable upstream CA - Update quickstart.md to cover both EAB and DNS01-TXT configuration paths - Add dns01-txt.png sequence diagram asset - Regenerate Hugo public/ output Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
…ion tests from external_test.go to config_test.go Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
config_test.go:
- Assert metricsEnabled derived field is set/unset correctly by Validate(),
including the invariant that it stays false when Validate() returns an error
- Add parseConfig round-trip test for dns01_txt JSON fields (provider,
dns_servers, env_vars) to guard against tag-name regressions after the
dns01 → dns01_txt rename
- Add parseConfig round-trip test for the metrics block, verifying the
dataSource camelCase JSON key matches the struct tag
external_test.go:
- Add TestNew_DNS01OnlyConfig: verifies New() sets dnsProvider on the
returned struct when only dns01_txt is configured (no EAB)
- Restore TestNew_ValidatesConfig: exercises New()'s error path for invalid
configs (empty bytes, missing ca_url, no mode, partial metrics)
Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements feature request as discussed in #35