Modules to Traffic Policy Actions reference
| Endpoint Module | Traffic Policy Action | Phase | Notes |
|---|---|---|---|
oauth | set-vars, oauth, custom-response | on_http_request | Maps OAuth provider and settings. |
oidc | oidc | on_http_request | Maps OpenID Connect settings. |
ip_policy | restrict-ips | on_tcp_connect | Maps allowed IPs or policies. |
mutual_tls and tls_termination | terminate-tls | on_tcp_connect | Maps mTLS and TLS termination settings. |
request_headers | add-headers, remove-headers | on_http_request | Modify request headers. |
response_headers | add-headers, remove-headers | on_http_response | Modify response headers. |
compression | compress-response | on_http_response | Enable response compression. |
webhook_validation | verify-webhook | on_http_request | Validate webhook secrets. |
circuit_breaker | circuit-breaker | on_http_request | Define circuit breaking thresholds. |
saml | (⚠️ Not supported) | N/A | Try OIDC or contact support for help. |
Migration instructions per module
OAuth authentication (oauth)
Old config example:
OpenID Connect authentication (oidc)
Old config example:
IP policy (ip_policy)
Old config example:
Mutual TLS and TLS termination (mutual_tls, tls_termination)
Old config example:
Request headers (request_headers)
Old config example:
Response headers (response_headers)
Old config example:
Compression (compression)
Old config example:
Webhook validation (webhook_validation)
Old config example:
Circuit breaker (circuit_breaker)
Old config example:
SAML authentication (saml)
- Traffic Policy does not currently natively support SAML.
- You may want to try out the OIDC action or reach out to ngrok support.
✅ Quick checklist
| Module | Traffic Policy Action |
|---|---|
| OAuth | set-vars, oauth, custom-response |
| OIDC | oidc |
| IP Policy | ip-restriction |
| Mutual TLS / TLS Term | terminate-tls |
| Request Headers | add-headers, remove-headers |
| Response Headers | add-headers, remove-headers |
| Compression | compress-response |
| Webhook Verification | verify-webhook |
| Circuit Breaker | circuit-breaker |
| SAML | ⚠️ (Not yet supported) |
🛡️ Final Tips
- Always test your Traffic Policy in staging before production.
- Validate YAML syntax carefully—indentation matters.
- If you have complex
expressions, validate them in small steps. - If unsure, rebuild small features first, then layer on more complex features.
- Backup your endpoint configuration before deletion.