You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP API JWT authorizer rejects array aud and matches client_id when aud is present #7652
The HTTP API (v2) JWT authorizer validates aud differently from API Gateway on AWS in two ways.
1. An array aud is always rejected.parseJwtClaims reads the claim with claims.path("aud").asText(null). For a JSON array, Jackson's asText() returns "", so the audience check compares the configured audience with an empty string and fails. An array aud is valid per RFC 7519 §4.1.3, and API Gateway accepts the token when any entry matches the authorizer's audience list.
Auth0 issues this shape whenever the openid scope is requested, for example ["https://api.example.com", "https://<tenant>.auth0.com/userinfo"]. So an Auth0-backed JWT authorizer can't authenticate any user-login token on Floci, while AWS accepts the same token.
2. client_id is matched even when aud is present. A token with aud: ["other"] and client_id: "expected" passes an authorizer configured with audience ["expected"]. The AWS docs say API Gateway checks client_id only when aud is absent; when both are present, it evaluates aud.
Repro (array aud)
Create an HTTP API with a JWT authorizer: issuer = https://<tenant>.auth0.com/, audience = ["https://api.example.com"].
Log in through Auth0 with scope=openid ...&audience=https://api.example.com.
Call a JWT-protected route with Authorization: Bearer <access token>. Floci returns 401 {"message":"Unauthorized"}.
Scope
Parse aud as either a string or an array, and match when any configured audience is among its entries.
Fall back to client_id (Cognito access tokens) only when the token has no aud claim. An aud that is present but empty or has no matching entry is rejected.
No change to signature, exp, iss or scope checks, or to their order.
A maintainer will triage this and add the right service label. If you included a minimal reproduction and the Floci version, that is everything we need — no action required from you right now.
Come say hi in Slack if you want to talk it through with maintainers and other contributors. Questions about AWS behaviour, design tradeoffs, and rough proposals are all welcome there.
Activity
github-actions commentedon Nov 6, 2026
👋 Thanks for opening your first issue in Floci!
A maintainer will triage this and add the right service label. If you included a minimal reproduction and the Floci version, that is everything we need — no action required from you right now.
Come say hi in Slack if you want to talk it through with maintainers and other contributors. Questions about AWS behaviour, design tradeoffs, and rough proposals are all welcome there.