| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
✅ Deploy Preview for oasisprotocol-cli canceled.
|
Sorry, something went wrong.
|
This seems to be a regression I introduced in #696. |
Sorry, something went wrong.
There was a problem hiding this comment.
Good job. I also tested it and seems to work.
Sorry, something went wrong.
Since #696 `oasis rofl machine show` derived the custom domain verification token from `out.Replica.App`. That registration is fetched with `out.Provider.SchedulerApp` in order to read the proxy domain metadata, so it is the provider's scheduler app and not the app deployed on the machine. The scheduler derives the token from `deployment.app_id`, so the TXT record we printed could never be verified: the scheduler logs "TXT record not found", never adds the SNI mapping for the domain, and the app's ACME TLS-ALPN-01 challenge fails with "unexpected order status: Invalid" until it hits the Let's Encrypt rate limit. Derive the token from the instance's deployment again, while keeping the nil deployment handling that #696 was after.
Pin the derivation against a token that a live rofl-scheduler 0.9.0 accepted, so the Go implementation cannot drift from the scheduler's Rust one unnoticed, and assert that the token is bound to the app it is derived from.
| Back | FazBrowse Home | New Git URL |
Problem
oasis rofl machine show prints the TXT record users must add to verify a custom proxy domain. Since #696 the token was derived from the provider's scheduler app ID instead of the deployed app ID:
The scheduler derives it from deployment.app_id, so the record we tell users to add can never verify. The failure is opaque: the scheduler logs TXT record not found (a token mismatch, not a missing record), never installs the SNI mapping, and the app's ACME TLS-ALPN-01 challenge fails with unexpected order status: Invalid until Let's Encrypt's authorization-failure limit kicks in.
Why it surfaced only now
#696 swapped in out.Replica.App to avoid a nil dereference when the machine has no deployment. That produced wrong tokens, but nothing failed visibly, because the scheduler's own derivation finalized TupleHash into a zero-length buffer and returned "" for every input — which reduced verification to contains("oasis-rofl-verification="), a prefix match that accepted any such record. rofl-scheduler v0.9.0 is the first release with the fixed derivation, so it is the first release that actually compares tokens.
Fix
Derive from insDsc.Deployment.AppID again, keeping the nil handling #696 was after: when nothing is deployed we now print a short notice instead of a token.
Impact
Anyone who added a TXT record based on output from a CLI containing #696 has an incorrect record and must re-run oasis rofl machine show and update DNS. Domains that appeared to verify under scheduler ≤0.8.0 were never genuinely verified.
Testing
gofmt, go vet, go test ./... clean. Verified end to end on a Testnet machine: replacing the TXT record with the correctly derived token made the scheduler log domain verification successful, and the certificate was issued.