ProxyWhirl Docs
Concepts

Security Model

Security boundaries for proxy use, credentials, logging, and target validation.

ProxyWhirl treats proxy usage as a network boundary problem.

BoundaryRule
Target URLsValidate user-provided targets before making requests.
CredentialsUse environment-backed secrets and redacted logging.
Private networksDo not proxy to private or loopback addresses unless explicitly allowed.
LogsAvoid recording raw credentials, keys, or full sensitive URLs.
SourcesTreat upstream proxy lists as untrusted input.

Environment Variables

Secrets and runtime paths are loaded from the environment — never hardcode keys in source or config files committed to git.

VariableComponentPurpose
PROXYWHIRL_KEYCLI / configMaster encryption key for stored credentials
PROXYWHIRL_CACHE_ENCRYPTION_KEYCacheFernet key for L2 cache encryption
PROXYWHIRL_STORAGE_PATHAPISQLite database path
PROXYWHIRL_API_KEYAPIREST API authentication key
PROXYWHIRL_MCP_API_KEYMCPMCP server authentication key
PROXYWHIRL_MCP_ALLOW_UNAUTHENTICATED_WRITESMCPLocal-dev override for MCP write actions (never enable in production)
PROXYWHIRL_MCP_DBMCPMCP database path

Generate encryption keys with proxywhirl.utils.generate_encryption_key() or the CLI config commands. Rotate keys on compromise and re-encrypt stored credentials.

Credential Handling

  • Use SecretStr in Pydantic models for passwords and API keys.
  • Exceptions redact sensitive URLs via redact_url() — verify logs never echo raw user:pass@host strings.
  • MCP and API write endpoints require authentication unless the explicit local-dev override is set.

Review generated API and CLI surfaces after security-sensitive changes to make sure documentation matches the exposed controls.

On this page