Commit 42a7bbd
committed
fix(dstack-ingress): carry the #104 challenge delegation through the restructure
#104 added ACME DNS-01 challenge delegation to entrypoint.sh. This branch
moves that file's logic into dns01.sh, so a plain rebase drops the shell
half of it: set_alias_record / set_txt_record / set_caa_record kept this
branch's versions and the delegation branches went with them.
Port them into dns01.sh, which is where the delegation belongs anyway --
it is a dns-01 capability, and entrypoint.sh no longer holds mode-specific
logic. Everything else from #104 survived the rebase untouched: the hook
script, unset_txt_record, the dnsman.py action, the certman.py branch and
the README section.
Two of the ports are deliberate substitutions, not copies:
- The CAA helpers reuse this branch's caa_tag_for() and "${domain#\*.}"
instead of re-introducing caa_domain_and_tag(). Behaviour is identical
for both wildcard and plain names; the second helper would only be a
second place to keep them in sync.
- The delegated TXT instruction prints $(txt_record_value) rather than
"$APP_ID:$PORT". APP_ID is an optional override, so the original printed
":443" whenever it was unset -- which is the common case. Printing the
same function that writes the record in non-delegation mode also stops
the instruction drifting from what the gateway actually expects.
Two more changes are integration fixes: bugs neither PR has alone, only
the combination.
- The delegation branch built its certbot command with CERTBOT_STAGING,
which this branch renamed to ACME_STAGING. ACME_STAGING=true plus
delegation would have issued *production* certificates.
- It also passed --email unconditionally, which this branch made optional;
with no contact address configured that is `--email ""`. It now uses the
same optional-contact handling as the plugin path.
Verified against a delegation run: the served zone is untouched, all four
static records print with correct values, the certbot command carries
--manual with both hooks plus --staging and
--register-unsafely-without-email, CAA verification fails closed with
exit 1, and ALLOW_MISSING_CAA=true overrides it.1 parent 09b7d8e commit 42a7bbd
2 files changed
Lines changed: 88 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | | - | |
| 306 | + | |
302 | 307 | | |
303 | 308 | | |
304 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
| |||
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
| |||
105 | 121 | | |
106 | 122 | | |
107 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
108 | 182 | | |
109 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
110 | 191 | | |
111 | 192 | | |
112 | 193 | | |
| |||
0 commit comments