Security: cross-tenant authz binding + ES256 pinning in JWT verify - #1
Open
dukevuzz wants to merge 2 commits into
Open
Security: cross-tenant authz binding + ES256 pinning in JWT verify#1dukevuzz wants to merge 2 commits into
dukevuzz wants to merge 2 commits into
Conversation
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
Two security fixes to the JWT path:
/validatebinds to the token'sprojectId+ scope, and the JWT issuer is enforced, so a token minted for one project can't be validated against another.Verifynow passesjwt.WithValidMethods(["ES256"]). A bare*SigningMethodECDSAtype check still accepted ES384/ES512; this closes the remaining algorithm ambiguity.Testing
go test ./internal/auth/green, including a new regression test that asserts both an HS256-signed token (alg confusion, signed with a symmetric secret) and an alg:none token are rejected by the ES256-pinned verifier.Context
Part of the Security Hardening epic (EXC-319). The matching verifier hardening on the data plane — ES256 pin + issuer binding in
JwtService— is in excalibase-graphql PR #62. Provisioning's function verifier was already compliant (ES256 + iss + projectId↔path binding), so it needed no change.https://claude.ai/code/session_01NEQh5YtRT9gfduicJiGJvu