Repository navigation
Sign DNS requests by default, for the endpoint's region (#883) - #889
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
spored signed DNS requests only when SPORE_DNS_SIGV4 was set, and only the Linux systemd units set it. The Windows service sets no environment, so Windows spored sent unsigned requests and the AWS_IAM Function URL refused them with 403 — observed on a v0.128.0 Windows spore. The opt-in existed to stage the #173 cutover; the default-on switch it promised never happened. Signing is now the default, with an explicit SPORE_DNS_SIGV4=0 opt-out. The signing region also came from the ambient config, correct only because LoadDefaultConfig does not read the region from IMDS and the us-east-1 fallback happened to match. It now comes from the Function URL's own hostname. Closes #883
scttfrdmn
force-pushed
the
fix/883-windows-dns-signing
branch
from
October 13, 2026 19:14
99fa653 to
ba8fb39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #883
The defect
spored SigV4-signs DNS requests only when
SPORE_DNS_SIGV4is set, and only the three Linux systemd units set it. The Windows service (spored service install) sets no environment, so Windows spored sent unsigned requests, and theAuthType: AWS_IAMFunction URL refuses those with 403 regardless of resource policy. Observed on a v0.128.0 Windows spore during #879's validation:So Windows spores couldn't register DNS — and the DNS lease from #875 couldn't work on Windows.
The opt-in existed to stage the #173 cutover: ship a signing client before flipping the URL to
AWS_IAM. Its own comment said "the flip and the default-on switch happen in lockstep". The flip happened; the switch never did. It only looked done because the Linux units set the variable.The fix
Signing is the default.
SPORE_DNS_SIGV4=0(orfalse/off/no) is an explicit opt-out for a deployment that genuinely runs an unauthenticated endpoint. An unset variable signs. The=1the Linux units still set is harmless and left alone.The signature is scoped to the Function URL's region. Found while making signing default: the region was the client's ambient
cfg.Region, falling back tous-east-1. That was right by accident —LoadDefaultConfigdoesn't read the region from IMDS, so on an instance it was usually empty and the fallback matched the URL. Any spored environment withAWS_REGIONset outside us-east-1 would sign for the wrong region and be refused. The region now comes from the endpoint's own hostname (<id>.lambda-url.<region>.on.aws), which cannot disagree with the endpoint; the ambient region is only a fallback for a custom endpoint whose hostname carries none.For the production URL this changes nothing on Linux — its region is us-east-1, the same value the fallback produced.
Gates
AWS_REGION=eu-west-2, end to end throughNewClient1/true/unset all signNot yet: validation on real Windows
spored reaches instances only through a release, so the end-to-end proof — a Windows spore registering DNS, with a lease — is a short Windows launch after the next release. Flagging it rather than claiming it.
🤖 Generated with Claude Code