-
Notifications
You must be signed in to change notification settings - Fork 54
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
Cert for both Wildcard and domain itself #195
Comments
@DarkSuniuM it loks like it's able to validate one of the two challenges but fails the second. This makes me wonder if PowerDNS is yet another of our legacy DNS drivers that doesn't handle the "duplicate" challenges - two different TXT values have to be attached to one DNS name. @kylejohnson You started this driver! Any thoughts? I see some discussion in #147, it looks like you confirmed that the domain + *.domain didn't work in the code as merged, but if a fix came up I can't find it. |
Yeah, At the same time I checked PowerDNS database and also I sent DNS queries to check the TXT record value, I confirm that it only sets up TXT record for the first domain and it does not cleanup the first one, till it finishes the second challenge. |
The current design of sewer's get_certificate() assumes that all challenges can be posted at once, validated by the ACME server, and then taken down. In principle it could handle the publish/validate/remove for each one separately, but that would be more of a rewriting than modifying. I'm not keen to embark on that at this time (if ever, really), especially since in the cases so far brought up it has been possible to work around the issue. Offhand I think route53 and gandi have been fixed recently, eg. Oh, and I have a note that cloudflare has a patch reported to let it work, though I don't think it's been posted here. ... not sure if route53 ever had the wild+bare domain issue - I only see where it was one that got just-the-wildcard fixed. And I don't know, now, why I have it marked as working. :-( |
Why not just adding a parameter for wildcard? # ...
domain_name = ['test.com', True] # the second element is for the wildcard, I don't like this, but it's a workaround.
# OR
domain_name = 'test.com' # With a simple type check, we can find out if the domain needs the wild card or not.
# The same logic can be used for domain_alt_names
# ... Or even having a separated class for # ...
class Domain: # Just an example.
domain_name: str
wildcard: bool = False
domain = Domain()
domain.domain_name = 'test.com'
domain.wildcard = True
client = Client(domain=domain, provider=DNSProvier) # Instead of `domain_name`, it is easier to use a domain parameter and have the wildcard status on that
# ... |
Why not just add a parameter for wildcard? I'm glad you asked - this is something I've been meaning to write up for the docs, so let's see what a first draft would look like...
From what I found in a quick scan of PowerDns' docs, it appears that the problem is probably just in how the driver uses the API. Both the backing store and API are pretty explicit about accepting multiple instances of same (name, type) records. Granted, it's in a manner that might be cumbersome to implement using the Legacy interface, but should be simple (and much more efficient of API calls for multiple-SAN certificates) when the driver has the whole list at once. Which is the sort of thing that motivated the new driver interface, of course. |
@DarkSuniuM @kylejohnson Any PowerDNS users working on this problem? |
Which version of python are you using?
3.8.3
What operating system and version of operating system are you using?
Tested on Archlinux, Alpine and Debian Buster
What version of sewer are you using?
0.8.2
What did you do? (be as detailed as you can)
Registered a cert on a wildcard address,
*.mydomain.com
, The cert only had*.mydomain.com
as domains and didn't work onmydomain.com
itself,Tried to use
mydomain.com
asdomain_name
and['*.mydomain.com']
asdomain_alt_names
,resulted in an error which is pasted below.
What did you expect to see/happen/not happen?
Get a new cert for the given domain and wildcard
What did you actually see/happen?
Error: Unable to issue certificate. error=Checks done=3. Max checks allowed=3. Interval between checks=8seconds.
Paste here the log output generated by
sewer
, if any. Please remember to remove any sensitive items from the log before pasting here.If you can, run sewer with loglevel set to debug; eg
sewer --loglevel DEBUG
The text was updated successfully, but these errors were encountered: