Security overview
How Goni authenticates users, isolates workspaces, protects data in transit, retains audit history, and validates secrets at boot.
Security overview
A one-page tour of the security posture a Goni workspace inherits by default. Every item below is enforced by the product; nothing here is aspirational.
You’ll learn:
- How authentication works (magic-link, PATs, optional OIDC)
- How workspace data is isolated at the warehouse layer
- How data in transit is protected
- How long the audit log is kept
- Why Goni refuses to boot with placeholder secrets
- How to delete your account and what happens next
Authentication
Goni ships three identity carriers for interactive and programmatic access:
- Magic-link sign-in. The default. Enter your work email, receive a one-time link, and land signed in. Tokens are single-use, expire quickly, and are rate-limited.
- Password sign-in. Passwords are hashed with Argon2id before storage; the plaintext never touches disk. Accounts without a password (magic-link-only) skip this path entirely.
- Personal access tokens (PATs). Long-lived bearer tokens minted from the app for CI, scripts, and MCP clients. Each user can hold up to 25 active PATs; TTL is user-selected between 1 and 365 days. Revocation is immediate on the next request.
Coming soon: OIDC single sign-on for each workspace with its own IdP (Google Workspace, Microsoft Entra, Okta, and others). Today it is one setting for a whole deployment, covered under Environment variables.
Session cookies are HttpOnly, Secure (in production), and SameSite=Strict. Refresh tokens rotate on every use; a stolen refresh token that gets replayed after rotation is refused and the whole session chain is revoked.
Workspace isolation
Each Goni workspace’s analytical data lives in its own set of warehouse databases. The isolation boundary is enforced by ClickHouse’s own access-control system:
- Every workspace is provisioned with a scoped warehouse user and
GRANTs that name the workspace’s databases only. There is no*.*wildcard and no cross-workspace grant. - The scoped user has no
ACCESS MANAGEMENTprivilege, so it cannot self-escalate. - A query against another workspace’s tables returns a warehouse-side permission error, not an application-level filter.
Inside a workspace, access control layers per-id allow-lists, row filters, and column masks on top of the warehouse boundary. Row filters and column masks apply identically to interactive sessions, PAT-bearer requests, and embedded views.
Transport
- TLS. The Goni app is served over HTTPS with HSTS in production. A warehouse you attach yourself is reached with the TLS setting you give it when you attach it. On Goni Cloud, the application reaches the warehouse inside our private cloud network, currently without TLS (
GONI_CH_SECURE=false). - Cookies.
HttpOnly,Secure,SameSite=Strict. SettingGONI_FORCE_SECURE_COOKIES=1pins theSecureflag regardless of the transport the request arrived on. - CORS. Cross-origin API access is default-deny in production. Explicit origins are allow-listed through
GONI_CORS_ALLOWED_ORIGINS. - SSRF gate. Every outbound webhook (alerts, reports, security fan-out, embed callbacks) is filtered against a private-address block-list. RFC1918 targets are refused unless explicitly opted into.
Secret storage
- Warehouse and source credentials are AES-256-GCM encrypted at rest with a 32-byte key from
GONI_SECRET_KEY. Fresh nonce per encrypt; empty round-trips to empty. On read, secret fields are replaced with a masked placeholder; the UI edit form preserves stored values when the field comes back empty. - Session and embed JWTs are signed with
GONI_JWT_SECRETandGONI_EMBED_SECRET. Both are rejected under 32 bytes. - Client IPs are hashed with
GONI_IP_SALTbefore storage; raw IPs are not retained.
Audit and retention
Every mutating action (policy update, connection change, dashboard save, pipeline run, alert fire, magic-link mint, PAT mint, embed token mint) is written to the audit log with the caller’s identity, the target artifact, and a machine-readable event kind. The log is queryable through the audit-and-lineage surface.
Retention windows for every category of data are enumerated on the Data retention policy page. Highlights:
- Audit log: 730 days (24 months), in Goni’s control-plane database. Rows older than 730 days are deleted automatically. A longer period can be agreed in an Enterprise contract.
- Alert and report run history: 90 days.
- Query metadata: 90 days.
- Account and profile: deletion request + 30 days.
Boot-time secret validation
In production (GONI_DEV_MODE unset or 0) Goni refuses to start when any of GONI_JWT_SECRET, GONI_EMBED_SECRET, GONI_SECRET_KEY, or GONI_IP_SALT is unset, shorter than 32 bytes, or matches a known placeholder value. The GONI_DEV_MODE=1 shortcut that enables X-Goni-User login, wildcard CORS, and dev-secret fallbacks is refused in production.
The email sender guard fires the same way: an install that would silently drop magic-link emails on the floor (Noop sender) refuses to boot outside GONI_DEV_MODE=1.
Together these guards make it hard to accidentally ship an install with a signing key of "changeme" or an outbound email path that goes nowhere.
Deleting your account
You can delete your Goni account at any time from Settings > Account in the app, or by calling:
curl -X DELETE https://your-goni-host/api/me \
-H "Authorization: Bearer $GONI_PAT" \
-H "Content-Type: application/json" \
-d '{"confirm":"you@example.com"}'
The confirm field must match the signed-in user’s email; a mismatch aborts the delete.
If you are the only owner of a workspace that has other members, Goni refuses the request with 409 and names the workspace. Make another member an owner first.
When the request succeeds, Goni:
- Revokes every active session and refresh token for the account.
- Purges every Personal Access Token the account holds.
- Deletes the account’s favorites and snippets.
- Erases the account’s query history in every workspace.
- Erases the uploaded files stored under the account’s email address. Files uploaded with a Personal Access Token are stored there; files uploaded in the app belong to the workspace and are kept.
- Disables the account in the workspace’s policy graph so past audit rows still resolve to a stable identifier without leaving the account addressable.
A response body summarises which steps succeeded. Analytical rows the account produced (dashboards, saved queries, charts, notebooks) are workspace-owned and survive the delete; ask a workspace admin to reassign or remove them if that is the intent.
Retention window. Your profile and your notifications are deleted 30 days after the request. The deletion cannot be undone. Audit rows referencing the account survive the full audit retention window (730 days) so historical accountability is preserved. See Data retention policy for the full table.
Workspace administrators can purge another user in their workspace with POST /api/admin/users/{email}/purge (requires allow_admin_policies). The cascade is the same, except that it erases the user’s query history only in the admin’s workspace. It keeps the uploaded files stored under the user’s email address and does not delete the profile.
When your last workspace ends. Goni closes your account when the last workspace you belong to ends. A workspace ends when its owner deletes it or when its free trial expires. Closing erases the same data as a deletion request. There is no 30-day wait: your profile and your notifications are deleted with the workspace record. A pending invitation to another workspace keeps your account open only if it was sent less than 30 days before your last workspace ends. Once that invitation is 30 days old and nobody has accepted it, Goni closes the account the same way. An account created only for an invitation, and never used to sign in, also closes this way once it is 30 days old and no newer invitation is pending.
Related
- Access control - the RBAC model, row filters, column masks
- Audit and lineage - how to query the audit log
- Data retention policy - retention windows for every category
- Environment variables - full reference for the secrets and toggles referenced above
- Embedded analytics - how embed tokens carry the same access boundary
Last updated