Troubleshooting SSRF and Loopback Block Errors
The AgentSecrets credential proxy enforces strict zero-trust boundaries to prevent malicious LLM agents, prompt injection payloads, or compromised packages from targeting internal network infrastructure or leaking credentials. If your requests are blocked with non_https_blocked or ssrf_blocked status codes, read this guide to resolve it safely.
Security Protections Enforced
By default, the credential proxy enforces two non-negotiable security layers:
- HTTPS Enforcement: All external API calls must use the secure
httpsscheme. Plain unencryptedhttp://traffic is strictly blocked to prevent credential sniffing on local networks. - SSRF & Loopback Block: Outbound connections targeting private IP ranges (RFC 1918 subnets:
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16), cloud metadata endpoints (169.254.169.254), or local loopback interfaces (127.0.0.1,localhost,::1) are blocked. This prevents an agent from targeting local management ports, internal databases, or cloud instance metadata credentials.
Diagnose and Fix
1DNS Resolution and Anti-Rebinding Defense
The proxy dialer resolves the target host's IP address before establishing an outbound connection and dials the resolved IP directly. This prevents DNS Rebinding attacks where a malicious domain's DNS record rotates mid-connection to point to an internal IP address.
- If your local proxy fails with
SSRF prevention: DNS lookup failed, verify that your host machine has an active internet connection and can resolve public DNS hostnames. - Check if a corporate firewall, VPN client, or local DNS filter is interfering with resolution.
2Testing Local & Mock Services Safely
Because AgentSecrets enforces strict zero-trust security across all execution contexts, raw loopback HTTP bypasses are blocked by default.
To test with local mock servers or staging APIs:
- Use HTTPS Reverse Proxies / Tunnels: Run your local mock server behind a local TLS reverse proxy (such as
caddy,mkcert,ngrok, orlocaltonet) that provides a valid HTTPS endpoint. - Add Domain to Allowlist: Add the tunnel domain to your workspace allowlist:
agentsecrets workspace allowlist add test-api.yourtunnel.dev - Target the HTTPS Endpoint: Route your agent calls to the secure HTTPS URL.
3Check Domain Allowlist Authorization
Even if a destination is a public HTTPS URL, the proxy returns 403 Forbidden (domain_not_allowed) if the domain is not explicitly registered in your workspace allowlist:
# Add domain to workspace allowlist agentsecrets workspace allowlist add api.stripe.com