mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
passing domain&altnames to dns-01 hook script? #96
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (May 7, 2016).
I'm using DNS-01.
I'm creating a cert with multiple altnames.
I exec
In 'letsencrypt.sh`, 1st "--domain" param is main domain, subsequent params are altnames
Per 'docs/dns-verification.md', in order to respond to the challenge, my DNS must contain entries for all of the domain+altnames. Here, e.g.,
This DNS record prep needs to be done in my hook.sh. And, I need to prepare the DNS, and wait for it to fully propagate, before answering the challenges.
So, I'd like to create ALL the necessary DNS records, and reload-dns-to-propagate, early in the hook.
But when invoking the script, at the initial invocation, 4 params are passed,
with ONLY the main domain available at this stage.
How can I get the full list of domain+altnames from letsencrypt.sh into my hook, on 1st call?
The info's there, as sign_domain() call's parsing the names ...
Do I have to separately/manually replicate the parse in my hook.sh -- dealing with either "--domain ..." or 'domains.txt' ?
@germeier commented on GitHub (May 7, 2016):
use HOOK_CHAIN, see https://github.com/lukas2511/letsencrypt.sh/blob/master/docs/hook_chain.md
@ghost commented on GitHub (May 7, 2016):
Great, thx.
With
The args passed to 'hook.sh' now take the Y*X parameters form,
over which I need to parse/iterate.
The docs/example point out
Extrapolating, in the hook chain case, the return
is
Is that correct? And, more importantly, is that stable/unchanging syntax (def'd by acme)?
@lukas2511 commented on GitHub (May 7, 2016):
@pgnd this syntax is not exactly stable and not defined by acme, this is custom to this script only. if it changes in the future i'll add an entry to the changelog.
closing this issue as your problem seems to be solved by using HOOK_CHAIN.
@ghost commented on GitHub (May 7, 2016):
@lukas2511 I know, but haven't seen, that upstream's working on DNS-01 auth code (still in beta?).
I assume that acme server, at some point in the procedure ACKs/returns the domain&alt-names, as well as the challenge tokens.
AfaYk, is that format defined/stable? If so, then possibly adopting it here would be helpful.
If not, of course, then we just deal with it here.
@lukas2511 commented on GitHub (May 11, 2016):
@pgnd i actually don't know how the official client works or is supposed to work, but from what i read on irc it seems that it just prints instructions