mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(apigateway): propagate TOKEN authorizer context to AWS_PROXY Lambda REST API Gateway TOKEN authorizers return a principalId + context map that floci silently dropped, so downstream AWS_PROXY Lambdas saw an empty event.requestContext.authorizer. LocalStack propagates both; this brings floci to parity and closes #574. - Thread authorizer result through invokeAuthorizer via a small AuthorizerResult record into buildProxyEvent; emit requestContext.authorizer only when a CUSTOM authorizer ran - Stringify context values at emit time to match AWS's flat-string wire contract - Replace the literal "api/stage/METHOD/path" methodArn in the authorizer event with the real arn:aws:execute-api:region:acct:apiId/stage/METHOD/path built from the incoming request, so policy-scoping authorizers can match Adds ApiGatewayAuthorizerContextIntegrationTest covering successful context propagation + principalId + real methodArn, unprotected routes (no authorizer injected), and deny returning 403. Out of scope: v2 HTTP API JWT authorizer context, REST REQUEST authorizer event-shape parity, authorizerResultTtlInSeconds caching. * test(apigateway): bump authorizer-context Lambda timeout to 30s The integration test creates two Node Lambdas back-to-back. Both inherited the default 3s function timeout, so on CI the proxy container's cold start ran past 3s while the authorizer was still warming, returning 502 from the API Gateway invoke path. Setting Timeout=30 on createNodeLambda gives both functions enough headroom for the concurrent cold starts. Mirrors the pattern Hector suggested in the PR review.