Control layers in order
| Layer | Description |
|---|---|
| 1. Network egress | Default-deny outbound traffic, with LLM endpoints reachable only from the proxy. |
| 2. Credential custody | Provider keys held by the proxy and nowhere else. |
| 3. Workload identity | Applications authenticate to the proxy with short-lived, platform-issued identity. |
| 4. Build and platform guardrails | Secrets scanning, SDK and endpoint restrictions, admission policy. |
| 5. Detection and verification | Logs, reconciliation and recurring bypass tests. |
The main bypass paths
A bypass happens when an application can reach an LLM provider endpoint directly, or can obtain a valid provider credential outside the proxy. The goal is to make the proxy the only workload that can do both.
Start by finding where those paths exist today. Inventory:
- Which workloads, CI/CD systems and workstations can reach provider endpoints.
- Which provider keys exist outside the proxy.
Layer one: network egress allow-listing
Apply default-deny outbound traffic, with LLM endpoints reachable only from the proxy. Enforce default-deny egress with the proxy as the only allowed source, and run bypass tests to confirm that other sources are blocked.
Before enforcing, turn on egress logging in detect-only mode to find current direct usage.
Layer two: credential custody and workload identity
Provider keys should be held by the proxy and nowhere else. Applications authenticate to the proxy with short-lived, platform-issued identity rather than with provider keys.
Move applications to the proxy using workload identity, then rotate or revoke the keys they used.
Layer three: secrets scanning, SDK and endpoint restrictions
Build and platform guardrails include secrets scanning, SDK and endpoint restrictions, and admission policy. Run secrets scanning in detect-only mode first to find provider keys that exist outside the proxy.
Layer four: detection and verification
Detection relies on logs, reconciliation and recurring bypass tests. The aim is to flag any direct call to a provider and to confirm that the controls keep working.
Reconcile provider usage with proxy logs on a recurring basis, and test the controls regularly.
Sequencing and residual gaps
Roll the controls out in this order:
- Inventory which workloads, CI/CD systems and workstations can reach provider endpoints, and which keys exist outside the proxy.
- Turn on egress logging and secrets scanning in detect-only mode to find current direct usage.
- Move applications to the proxy using workload identity, then rotate or revoke the keys they used.
- Enforce default-deny egress with the proxy as the only allowed source, and run bypass tests.
- Reconcile provider usage with proxy logs on a recurring basis.