Skip to main content

Edge Route JWT Validation Module

Replace HTTPS Edge Route JWT Validation Module

Request

PUT /edges/https/{edge_id}/routes/{id}/jwt_validation

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"issuer":{"allow_list":[{"value":"https://dev-72114178.okta.com/oauth2/default"}]},"audience":{"allow_list":[{"value":"api://default"}]},"http":{"tokens":[{"type":"at+jwt","method":"header","name":"Authorization","prefix":"Bearer "}]},"jws":{"allowed_algorithms":["RS256","ES256"],"keys":{"sources":{"additional_jkus":["https://dev-72114178.okta.com/oauth2/default/v1/keys"]}}}}' \
https://api.ngrok.com/edges/https/edghts_2bMmWzYWLzzKgJYEmATUCeKyXC7/routes/edghtsrt_2bMmWyYf66VUxm5wo7sfcLgrHoH/jwt_validation

Parameters

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
issuerEndpointJWTValidationIssuerConfigconfiguration about the Issuer(s) of the JWTs.
audienceEndpointJWTValidationAudienceConfigconfiguration about the Audience(s) of the JWTs.
httpEndpointJWTValidationHTTPConfigconfiguration about the HTTP requests containing JWTs.
jwsEndpointJWTValidationSigningConfigconfiguration about signed JWTs (JWS).

EndpointJWTValidationIssuerConfig parameters

NameTypeDescription
allow_listEndpointJWTValidationIssuerthe list of allowed issuers.

EndpointJWTValidationIssuer parameters

NameTypeDescription
valuestringthe URL of the issuer.

EndpointJWTValidationAudienceConfig parameters

NameTypeDescription
allow_listEndpointJWTValidationAudiencethe list of allowed audiences.

EndpointJWTValidationAudience parameters

NameTypeDescription
valuestringthe audience value.

EndpointJWTValidationHTTPConfig parameters

NameTypeDescription
tokensEndpointJWTValidationHTTPTokenthe list of tokens to validate.

EndpointJWTValidationHTTPToken parameters

NameTypeDescription
typestringthe type of the JWT, which acts as a hint to ngrok about how to parse. Must be one of "jwt", "at+jwt", or "it+jwt".
methodstringthe type of location to expect the JWT. Must be one of "header" or "body".
namestringthe name of the header or body field where the JWT is expected.
prefixstringany prefix to strip from the JWT before parsing.

EndpointJWTValidationSigningConfig parameters

NameTypeDescription
allowed_algorithmsList<string>the list of allowed signing algorithms.
keysEndpointJWTValidationSigningKeysthe configuration for the JWT signing keys.

EndpointJWTValidationSigningKeys parameters

NameTypeDescription
sourcesEndpointJWTValidationSigningKeySourcesthe configuration for acquiring the key material used to verify the signed JWTs.

EndpointJWTValidationSigningKeySources parameters

NameTypeDescription
additional_jkusList<string>the list of URLs which serve the possible signing keys in JWKS format.

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"issuer": {
"allow_list": [
{
"value": "https://dev-72114178.okta.com/oauth2/default"
}
]
},
"audience": {
"allow_list": [
{
"value": "api://default"
}
]
},
"http": {
"tokens": [
{
"type": "at+jwt",
"method": "header",
"name": "Authorization",
"prefix": "Bearer "
}
]
},
"jws": {
"allowed_algorithms": ["RS256", "ES256"],
"keys": {
"sources": {
"additional_jkus": [
"https://dev-72114178.okta.com/oauth2/default/v1/keys"
]
}
}
}
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
issuerEndpointJWTValidationIssuerConfigconfiguration about the Issuer(s) of the JWTs.
audienceEndpointJWTValidationAudienceConfigconfiguration about the Audience(s) of the JWTs.
httpEndpointJWTValidationHTTPConfigconfiguration about the HTTP requests containing JWTs.
jwsEndpointJWTValidationSigningConfigconfiguration about signed JWTs (JWS).

EndpointJWTValidationIssuerConfig fields

NameTypeDescription
allow_listEndpointJWTValidationIssuerthe list of allowed issuers.

EndpointJWTValidationIssuer fields

NameTypeDescription
valuestringthe URL of the issuer.

EndpointJWTValidationAudienceConfig fields

NameTypeDescription
allow_listEndpointJWTValidationAudiencethe list of allowed audiences.

EndpointJWTValidationAudience fields

NameTypeDescription
valuestringthe audience value.

EndpointJWTValidationHTTPConfig fields

NameTypeDescription
tokensEndpointJWTValidationHTTPTokenthe list of tokens to validate.

EndpointJWTValidationHTTPToken fields

NameTypeDescription
typestringthe type of the JWT, which acts as a hint to ngrok about how to parse. Must be one of "jwt", "at+jwt", or "it+jwt".
methodstringthe type of location to expect the JWT. Must be one of "header" or "body".
namestringthe name of the header or body field where the JWT is expected.
prefixstringany prefix to strip from the JWT before parsing.

EndpointJWTValidationSigningConfig fields

NameTypeDescription
allowed_algorithmsList<string>the list of allowed signing algorithms.
keysEndpointJWTValidationSigningKeysthe configuration for the JWT signing keys.

EndpointJWTValidationSigningKeys fields

NameTypeDescription
sourcesEndpointJWTValidationSigningKeySourcesthe configuration for acquiring the key material used to verify the signed JWTs.

EndpointJWTValidationSigningKeySources fields

NameTypeDescription
additional_jkusList<string>the list of URLs which serve the possible signing keys in JWKS format.

Get HTTPS Edge Route JWT Validation Module

Request

GET /edges/https/{edge_id}/routes/{id}/jwt_validation

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2bMmWzYWLzzKgJYEmATUCeKyXC7/routes/edghtsrt_2bMmWyYf66VUxm5wo7sfcLgrHoH/jwt_validation

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"issuer": {
"allow_list": [
{
"value": "https://dev-72114178.okta.com/oauth2/default"
}
]
},
"audience": {
"allow_list": [
{
"value": "api://default"
}
]
},
"http": {
"tokens": [
{
"type": "at+jwt",
"method": "header",
"name": "Authorization",
"prefix": "Bearer "
}
]
},
"jws": {
"allowed_algorithms": ["RS256", "ES256"],
"keys": {
"sources": {
"additional_jkus": [
"https://dev-72114178.okta.com/oauth2/default/v1/keys"
]
}
}
}
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
issuerEndpointJWTValidationIssuerConfigconfiguration about the Issuer(s) of the JWTs.
audienceEndpointJWTValidationAudienceConfigconfiguration about the Audience(s) of the JWTs.
httpEndpointJWTValidationHTTPConfigconfiguration about the HTTP requests containing JWTs.
jwsEndpointJWTValidationSigningConfigconfiguration about signed JWTs (JWS).

EndpointJWTValidationIssuerConfig fields

NameTypeDescription
allow_listEndpointJWTValidationIssuerthe list of allowed issuers.

EndpointJWTValidationIssuer fields

NameTypeDescription
valuestringthe URL of the issuer.

EndpointJWTValidationAudienceConfig fields

NameTypeDescription
allow_listEndpointJWTValidationAudiencethe list of allowed audiences.

EndpointJWTValidationAudience fields

NameTypeDescription
valuestringthe audience value.

EndpointJWTValidationHTTPConfig fields

NameTypeDescription
tokensEndpointJWTValidationHTTPTokenthe list of tokens to validate.

EndpointJWTValidationHTTPToken fields

NameTypeDescription
typestringthe type of the JWT, which acts as a hint to ngrok about how to parse. Must be one of "jwt", "at+jwt", or "it+jwt".
methodstringthe type of location to expect the JWT. Must be one of "header" or "body".
namestringthe name of the header or body field where the JWT is expected.
prefixstringany prefix to strip from the JWT before parsing.

EndpointJWTValidationSigningConfig fields

NameTypeDescription
allowed_algorithmsList<string>the list of allowed signing algorithms.
keysEndpointJWTValidationSigningKeysthe configuration for the JWT signing keys.

EndpointJWTValidationSigningKeys fields

NameTypeDescription
sourcesEndpointJWTValidationSigningKeySourcesthe configuration for acquiring the key material used to verify the signed JWTs.

EndpointJWTValidationSigningKeySources fields

NameTypeDescription
additional_jkusList<string>the list of URLs which serve the possible signing keys in JWKS format.

Delete HTTPS Edge Route JWT Validation Module

Request

DELETE /edges/https/{edge_id}/routes/{id}/jwt_validation

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2bMmWzYWLzzKgJYEmATUCeKyXC7/routes/edghtsrt_2bMmWyYf66VUxm5wo7sfcLgrHoH/jwt_validation

Response

Returns a 204 response with no body on success