Validate JWT tokens by checking that the scp claim contains at least one value from an allowed list (any-of-N scope validation) using the JWT Validation policy on Managed Omni Gateway.
STEPS TO FOLLOW:
1. Apply the latest JWT Validation policy on a Managed Omni Gateway API instance.
2. Add a Custom Claim Validation row with an OR-style DataWeave expression, e.g.:
Key: scp
Value: #[(vars.claimSet.scp contains "scope-a") or (vars.claimSet.scp contains "scope-b")]
3. Click Apply — UI reports success.
4. Send a request with a JWT whose scp matches none of the allowed scopes.
5. Observe: HTTP 200 returned — the validation row was silently dropped.
NOTE:
1.Map / reduce expressions: no error — policy applies but validation is silently skipped, unauthorized tokens return HTTP 200. If you need additional DataWeave function support (e.g. map/reduce, or other DW function extensions) for Flex Gateway policies, please upvote this feature enhancement request: Enhance DataWeave support for Flex Gateway policies
2.EXPRESSIONS THAT FAIL OR BEHAVE UNEXPECTEDLY:
#[(vars.claimSet.scp contains "a") or (vars.claimSet.scp contains "b")]
#[vars.claimSet.scp some (["a", "b"] contains $)]
#[vars.claimSet.scp map (["a", "b"] contains $) reduce ($$ or $)]
#[["a", "b"] contains vars.claimSet.scp[0] or ["a", "b"] contains vars.claimSet.scp[1]]
005390575

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.