According to RFC 7519, the aud (Audience) claim can be either a single string or an array of strings.
In vulnerable versions of jwt-go, extracting the audience claim using a string type assertion (claims["aud"].(string)) silently failed whenever an array was provided, causing the audience to evaluate to an empty string ("").
This endpoint simulates an Admin Console. The service checks the signature using an internal identity provider key (you cannot forge new tokens). Its authorization logic applies these rules:
public_api) are strictly denied access."") are grandfathered in as legacy internal admin tokens.Both tokens below are legitimately signed by the identity provider:
Payload: {"user": "bob", "aud": "public_api"}Payload: {"user": "alice", "aud": ["billing_service", "reports_service"]}Lab created by Robin Wood - DigiNinja