Warn users when DNS ACME challenges are required for wildcard certificates #1327
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.
Currently, when users attempt to obtain wildcard certificates using HAProxy Ingress ACME support, the process fails with a cryptic error message:
"Order's status ("pending") is not acceptable for finalization". This occurs because HAProxy Ingress only supports HTTP-01 challenges, but wildcard certificates require DNS-01 challenges. Users are left confused about why their certificates aren't being issued and how to resolve the issue.Solution
Implement proactive detection and user-friendly warnings when DNS-01 challenges are required for wildcard domains. Instead of failing silently with unclear errors, provide clear guidance on what needs to be done.
Changes Made
1. Wildcard Domain Detection
hasWildcardDomain()utility function to identify wildcard certificates*.example.com, mixed domain lists, and invalid patterns2. Challenge Analysis & Warnings
authorize()method to analyze available ACME challenges3. Error Messages
4. Testing Infrastructure
ACMEClientinterface for proper mockingFiles Changed
pkg/acme/client.go- Core implementation with challenge detection and warningspkg/acme/client_test.go- Comprehensive test suite for all functionalitypkg/acme/signer_test.go- Integration tests for signer-level error handling