Move lad_v2 Beacon auth to a single API Gateway authorizer - #410
Merged
Conversation
Adds LH-BeaconAuthorizerV2, a Lambda REQUEST authorizer wrapping the existing verifyBeaconToken logic (same trusted-issuer allow-list, same beaconApi scope check), and attaches it to all /lad_v2/... routes so invalid/missing tokens are rejected at the gateway before any backend Lambda runs. The five backend Lambdas now read the verified member id from the authorizer's context instead of re-verifying the token themselves, removing duplicated JWKS/JWT logic from each one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
LH-BeaconAuthorizerV2, wrapping the existingverifyBeaconTokenlogic (same trusted-issuer allow-list, samebeaconApiscope check) as an API Gateway Lambda authorizer/lad_v2/...routes — invalid/missing tokens are now rejected at the gateway before any backend Lambda runsroute-v2,share-v2,geocode-v2,default-assets-v2,map-layers-v2) no longer verify the token themselves; they read the verified member id from the authorizer's context insteadNote
This PR is code-only. The AWS infra (authorizer Lambda, route auth type, unused env var cleanup, CloudWatch dashboard) is already deployed and live-verified against production — this PR catches the repo up to what's running.
Test plan
Authorizationreturn 401/403 at the gateway without invoking the backend Lambdas🤖 Generated with Claude Code