See this guide for specific instructions on configuring this action with Auth0.
Configuration reference
The Traffic Policy configuration reference for this action.Supported phases
on_http_request
Type
jwt-validation
Configuration fields
Behavior
Request validation
ngrok allows the request only if the issuer correctly signed it and the defined claims match. For efficient token validation, include the optionalkid claim in your JWTs and JWK payload.
You can implement custom validation in Traffic Policies with the actions.ngrok.jwt_validation.tokens action result variable and its corresponding properties.
Multiple issuers
You can specify multiple issuers for JWT validation. ngrok considers a request valid if it presents a JWT signed by any of the specified issuers. The issuer must exactly match the one provided in the JWT, including any trailing slashes (/) present in the iss claim.
Multiple audience claims
You can optionally specify one or more audience (aud) claims for JWT validation.
If present, the aud claim must contain at least one of the specified audience claims and exactly match for validation to succeed.
Multiple signing keys
You can provide multiple JSON Web Key Set (JWKS) URLs and signing algorithms. During JWT validation, ngrok tries the JWKS and algorithms you provide, in order, to validate the JWT. ngrok caches the list for performance and refreshes the cache roughly every 15 minutes, or less often when the JWKS response sets a longerCache-Control: max-age or Expires.
Multiple tokens
If you define multiple tokens within the HTTP configuration parameter, all tokens must be present in the request. If any token is missing, ngrok returns a401 Unauthorized status code.
Non-terminating action
This is a Non-terminating action. It does not return a response, and will allow Traffic Policy processing to continue to the next Action in the chain. All Cloud Endpoint Traffic Policies must end with a terminating action. This requirement does not apply to Agent Endpoints.Examples
Basic example
The following Traffic Policy configuration is an example configuration of thejwt-validation action. For a
more real-world example, check out the Auth0 guide.
Example Traffic Policy document
Example request
Authorization header with the Bearer prefix and getting back a 200 OK
response.