A proxy that records API traffic is a proxy that sees credentials, tokens, and potentially sensitive response data. We take that seriously — not as a policy promise, but as an architectural constraint. Here's exactly what we do and why.
The most common question we get from security-conscious teams is straightforward: "Your proxy sees every API call. What happens to my credentials?"
It's the right question to ask. Here's the complete answer.
Gostly uses two separate data stores with different purposes and different safety properties. Understanding the distinction is the foundation of the security model.
Local JSONL (replay data)
Recorded bodies stay on your data volume, subject to capture limits. Recorded credential headers are floored by default; explicit verbatim persistence keeps them. Snapshot replay files retain the archive's original content. Imported mock serving files receive credential redaction before storage.
Postgres (mock library)
Recorded traffic and snapshot imports pass through broader body and header scrubbing before their Postgres rows are marked as scrubbed. Imported and seeded mock rows receive structural credential redaction and a sensitive response-header floor before storage. That insertion does not perform a general personal-data scrub or set the scrubbed mark. AI training and default mock-library exports use only marked rows.
The two stores follow different rules. The sections below say where each rule applies, and where it does not.
The JSONL traffic files written during LEARN mode live in a Docker volume on the machine running the proxy. The capture path does not send those files to Gostly or include them in usage telemetry. Review any export or backup before sharing it.
In a managed Postgres (Team tier) deployment, the Postgres rows may live outside your local machine. Recorded traffic and snapshot imports pass through the broader scrubber locally before their Postgres rows are marked as scrubbed. Imported mock rows receive credential-focused redaction before storage, not a general personal-data scrub. Review and sanitize source files before uploading them, especially when the database lives off the machine.
Local replay files retain captured response bodies, subject to capture limits. Header redaction does not scrub those body values. A restored snapshot's local replay files retain the archive's original content, separately from its scrubbed Postgres rows. Choose what you record and review the local data volume as a store of sensitive traffic.
When you trigger a transition, the scrubbing pipeline applies your configured redaction rules to bodies before writing to Postgres. Configured scrub paths (e.g. $.user.email, $.payment.card_number) are replaced with [REDACTED] and the row is marked with a scrubbed_at timestamp. AI training and default mock-library exports read only rows that carry it. The sync layer refuses to overwrite a scrubbed row with an unscrubbed one. An export that explicitly includes unmarked rows has a different boundary; a saved archive is not freshly sanitized when downloaded.
Scrubbing recognizes supported credential formats, sensitive field names and structured personal-data patterns. Values outside recognized shapes or contexts can remain, including names or addresses in free text. A scrubbed mark records pipeline completion; it does not certify that every secret or personal detail was removed. Review data before sharing it.
In recorded proxy traffic, the credential-header floor applies to default disk capture and shipped proxy streams. Explicit verbatim persistence changes the local disk boundary, as described below. Imported mock rows receive structural credential redaction and a sensitive response-header floor before their stored rows, revisions and serving files are written. Snapshot imports retain their archive content in local replay files and pass through the broader scrubber on their way into Postgres. This is the recorded-header floor:
authorization proxy-authorization cookie set-cookie x-api-key x-auth-token x-session-id x-access-token x-user-token x-csrf-token x-amz-security-token x-amz-session-token x-goog-api-key grpc-metadata-authorization api-key token
Configuration cannot remove or replace entries in this list. Keeping recorded headers on disk takes an explicit air-gap opt-out, described below. The REDACT_HEADERS environment variable adds to it — it cannot shrink it. The enforcement is structural: it lives in the proxy itself, not in a policy document.
Privacy by sink, not a single switch
A policy that says "we don't write credentials to disk" is only as strong as the process that enforces it. We enforce it structurally, per sink, on the same path that processes every request. The credential-header floor applies to shipped proxy streams without an opt-out; recorded disk replay headers use the floor by default, withMOCK_PERSIST_VERBATIM as an explicit air-gap-only opt-out; and the active-session replay store keeps captured bodies and session headers in RAM for supported stateful flows (Set-Cookie, CSRF, OAuth). That buffer resets on restart or a new LEARN window. Header redaction, body scrubbing and snapshot replay-file retention are separate boundaries; none is a guarantee that all sensitive content was removed.Full Compose routes response generation through local inference and model services. The retrieval index draws on local mock files, and its examples can retain response content. Review that material before using it for retrieval or generation.
Separately configured AI analysis and model connections can use external destinations. Prompts and included API content can then leave the installation. Review the chosen destination and the content sent through each connection before enabling it.
Licensing, telemetry, selected upstream requests and integrations have their own connection and data rules. A local model does not govern those other outbound paths. See the AI and data boundaries for the local pipeline and configured external paths.
Beyond the header floor, the redaction list is configurable via the REDACT_HEADERS environment variable (additive only — see above) and via the per-service scrub settings in your local operator dashboard. See the security model documentation. The local settings let you add JSONPath body rules and extra header redactions on top of every default pattern.
Available now — body-level scrub config
PUT /v1/scrub/config upserts your JSONPath body rules; POST /v1/scrub/test previews any rule set against a sample payload before you save. The dashboard surface lives at /settings/scrub.PUT /v1/scrub/config
{
"service_id": "stripe",
"jsonpath_rules": [
{ "path": "$.user.email", "replacement": "<scrubbed>" },
{ "path": "$.source.card.number", "replacement": "<card>" },
{ "path": "$.source.card.cvc", "replacement": "<cvc>" }
],
"header_redactions": ["Authorization", "Cookie", "X-Api-Key", "X-Custom-Auth"],
"enabled": true
}JSONPath expressions are validated at save time — a path that would replace the entire payload (e.g. $ or $..*) is rejected. The goal is targeted redaction, not blanket removal that breaks your test data. The default pattern-based scrub continues to run underneath every per-service config — you can add to the floor, never lower it.
Gostly is self-hosted and single-tenant per deployment. Your captured traffic, your mocks, and your scrubbed library live in your own database — they are never co-mingled with another customer's data, because another customer's data is never in the same deployment to begin with.
In the self-hosted API, application access carries tenant scope. Request handlers use a non-owner database role that cannot bypass Row-Level Security, and the tenant-scoped database dependency binds context for the transaction. Covered API tables force their tenant-isolation policies, so Postgres enforces those policies beneath the application filters. Some cross-tenant maintenance uses separate credentials with an intentional RLS bypass.
Database-enforced defense in depth
This API posture depends on completing the migrations and retaining the separate request, maintenance and migration roles. Keep the serving API on its non-owner request credentials. Custom database connections must preserve the tenant context required by the policies. The security model and installation guide describe those deployment requirements.Self-hosted deployments default to local password auth: bcrypt with a cost factor of 12, password length capped at 72 bytes (the bcrypt limit, not a policy choice), and session cookies marked HttpOnly and Secure.
Every installation can enable SAML 2.0 and OIDC alongside or in place of password auth. Group-to-role mapping is driven by the IdP's assertion attributes, with a configurable default for users whose groups don't map. Setup specifics — IdP metadata, attribute mapping, role assignment — live in the SSO documentation.
Multi-user workspaces (Team tier) ship four built-in roles:
owner — full control; cannot demote the last owner in a tenant admin — manage users, services, scrub config; cannot delete the workspace member — record traffic, manage their own services viewer — read-only access to dashboards and recorded traffic
Role enforcement runs at every gated endpoint and is mirrored in the dashboard UI, so a viewer who tries to access a member-only page sees the same answer the API would give them. Pro runs in single-user mode with the admin auto-bootstrapped on first boot; Team adds multi-user workspaces.
Self-hosted Gostly keeps legacy authentication and activity logs separate from its retained deployment history. Signed-in owners and administrators can review that tenant-scoped history of selected authentication and administrative actions. Access follows the deployment's authentication and license-admission rules.
Saved scrub-policy changes are included in the retained history. Those events record changed configuration categories and rule/header counts without copying rule contents or captured traffic into the event.
Ordinary runtime database access to this retained history is read-and-append. Privileged maintenance can remove expired records. This is not a tamper-proof archive.
Hosted organization audit is a separate Team feature. See the audit and access documentation for the deployment history and its access and retention boundaries.
To be transparent about what does leave your machine:
Key-based licensing uses online validation with a license key and machine identifier, plus bounded local caches. Enterprise signed-file licensing on supported standard images verifies locally instead. Its signed expiry governs access.
When you pull Gostly images from registry.gostly.ai, standard Docker registry logs apply (image name, version, authenticated user).
Allowlisted usage and reliability counters — no request or response bodies, full URLs, credentials or raw service names. On by default; the telemetry page lists the signals and how to turn them off.
No API payloads, no request or response bodies, and no recorded or scrubbed mock records are transmitted to Gostly.
Enterprise signed-file licensing and the separate no-Gostly-egress build are different deployment paths. Local license verification does not make an installation fully air-gapped. Review image acquisition and updates, telemetry settings and the external services you choose.
Follow the Enterprise license installation and renewal guide for supported images, tenant preservation, signed expiry and restart requirements. For deployment questions, contact security@gostly.ai.
The security model is:
If you have specific questions about data handling for a regulated industry deployment — healthcare, financial services, or anything with specific compliance requirements — reach out at security@gostly.ai. We'll give you a straight answer.