Repository navigation
chore: remove legacy identity-doc auth from dns-updater (#173 step 4) - #256
Merged
Merged
Conversation
The dns-updater Function URL now runs under AuthType: AWS_IAM (the #173 flip is live + verified), so the handler authorizes solely on the SigV4-verified caller account. The old spoofable path is now dead code — remove it: - delete signature.go (embedded per-region AWS certs + PKCS#7/RSA verification) - delete legacyAuthorize() + validateInstance() (the cross-account default-allow) - drop the instance_identity_document / instance_identity_signature request fields and the InstanceIdentityDocument type - drop the github.com/fullsailor/pkcs7 dependency and the now-unused ec2 client - handler now rejects any request without a verified IAM authorizer (403) — can't happen under AWS_IAM, but defends against an accidental revert to NONE Closes the #173 HIGH Route53-spoofing vuln and retires the #294 cert-maintenance problem for good. Tests: TestHandlerRejectsWithoutIAMAuthorizer (replaces the legacy-path test). go test + vet + gofmt clean. Refs #173, #294.
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.
Summary
Final step of the #173 cutover. The
spawn-dns-updaterFunction URL is now live underAuthType: AWS_IAM(flipped + verified — see #387), so the handler authorizes solely on the SigV4-verified caller account. The old instance-identity-document path is dead code; this removes it.Removed
signature.go— the embedded per-region AWS certs + PKCS#7/RSA identity-doc verification (the [audit] Dup: formatDuration and formatDurationForTTL are byte-identical — collapse to one #294 maintenance burden).legacyAuthorize()+validateInstance()— including the cross-account default-allow that was the core of the vulnerability.instance_identity_document/instance_identity_signaturerequest fields + theInstanceIdentityDocumenttype.github.com/fullsailor/pkcs7dependency and the now-unusedec2client.Behavior
The handler now rejects any request lacking a verified IAM authorizer with 403. Under
AuthType: AWS_IAMthat can't occur (the URL rejects unsigned callers first), but it defends against an accidental revert toNONEsilently re-opening the hole. Unknown JSON fields (older clients still sending the identity doc) are ignored.Tests
TestHandlerRejectsWithoutIAMAuthorizer(replaces the legacy-path test) covers no-authorizer / authorizer-without-IAM / IAM-without-account → all 403.go test,go vet,gofmtclean;go.sumtidied (pkcs7 gone).Closes the #173 HIGH Route53-spoofing vulnerability and retires #294.