TLS Edge Policy Module
Replace TLS Edge Policy Module
Request
PUT /edges/tls/{id}/policy
Example Request
curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"inbound":[{"actions":[{"config":{"metadata":{"edgeId":"edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn","message":"Invalid TLS Version"}},"type":"log"},{"type":"deny"}],"expressions":["conn.tls.version.contains('1.3')"],"name":"AllowTLS1.3"}]}' \
https://api.ngrok.com/edges/tls/edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn/policy
Parameters
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
inbound | EndpointRule | the inbound rules of the traffic policy. |
outbound | EndpointRule | the outbound rules on the traffic policy. |
EndpointRule parameters
Name | Type | Description |
---|---|---|
expressions | List<string> | cel expressions that filter traffic the policy rule applies to. |
actions | EndpointAction | the set of actions on a policy rule. |
name | string | the name of the rule that is part of the traffic policy. |
EndpointAction parameters
Name | Type | Description |
---|---|---|
type | string | the type of action on the policy rule. |
config | object | the configuration for the action on the policy rule. |
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"inbound": [
{
"actions": [
{
"config": {
"metadata": {
"edgeId": "edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn",
"message": "Invalid TLS Version"
}
},
"type": "log"
},
{
"config": null,
"type": "deny"
}
],
"expressions": ["conn.tls.version.contains('1.3')"],
"name": "AllowTLS1.3"
}
],
"outbound": null
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
inbound | EndpointRule | the inbound rules of the traffic policy. |
outbound | EndpointRule | the outbound rules on the traffic policy. |
EndpointRule fields
Name | Type | Description |
---|---|---|
expressions | List<string> | cel expressions that filter traffic the policy rule applies to. |
actions | EndpointAction | the set of actions on a policy rule. |
name | string | the name of the rule that is part of the traffic policy. |
EndpointAction fields
Name | Type | Description |
---|---|---|
type | string | the type of action on the policy rule. |
config | object | the configuration for the action on the policy rule. |
Get TLS Edge Policy Module
Request
GET /edges/tls/{id}/policy
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn/policy
Response
Returns a 200 response on success
Example Response
{
"enabled": true,
"inbound": [
{
"actions": [
{
"config": {
"metadata": {
"edgeId": "edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn",
"message": "Invalid TLS Version"
}
},
"type": "log"
},
{
"config": null,
"type": "deny"
}
],
"expressions": ["conn.tls.version.contains('1.3')"],
"name": "AllowTLS1.3"
}
],
"outbound": null
}
Fields
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
inbound | EndpointRule | the inbound rules of the traffic policy. |
outbound | EndpointRule | the outbound rules on the traffic policy. |
EndpointRule fields
Name | Type | Description |
---|---|---|
expressions | List<string> | cel expressions that filter traffic the policy rule applies to. |
actions | EndpointAction | the set of actions on a policy rule. |
name | string | the name of the rule that is part of the traffic policy. |
EndpointAction fields
Name | Type | Description |
---|---|---|
type | string | the type of action on the policy rule. |
config | object | the configuration for the action on the policy rule. |
Delete TLS Edge Policy Module
Request
DELETE /edges/tls/{id}/policy
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/tls/edgtls_2hrGzbGeGrBJt43Myxmkxp3YVTn/policy
Response
Returns a 204 response with no body on success