Layer7 API Management

Policy Repository: JWT with multiple AUD claims 

Aug 09, 2019 08:44 AM

I recently had a request to support using multiple values in the JWT audience claim.
This policy was created as a work around. It allows a space separated list in the AUD field and provides logic to parse each value.

To use: 

  1. Open policy manager and create a test service
  2.  Download the attached file and import the XML file into your new service
  3.  Hit the endpoint via your desired user agent (i.e: browser, SOAPUI, etc).

The response will be the created ID token, number of AUD claims found and each individual value.
i.e: 

ID Token:
------------------------------------
{
"sub": "UYRgV-rtgM0cghVHYR245KaoCF1VPfTgqbMXP-DJ9",
"aud": "Azad Greg Gil",
"iss": "https://gateway.broadcom.com:8443",
"exp": 1959999999,
"iat": 1565354571
}


Number of AUD claim entries:
------------------------------------
3


AUD claim values
------------------------------------
Azad
Greg
Gil

Statistics
0 Favorited
16 Views
1 Files
0 Shares
1 Downloads
Attachment(s)
xml file
jwt_multiple_aud_claims.xml   7 KB   1 version
Uploaded - Aug 09, 2019

Tags and Keywords

Related Entries and Links

No Related Resource entered.