This page explains how BeforeQuery protects your data by design, and which controls you should configure for your own deployment.

Lock down credentials

  • Dashboard sign-in — email/password, Google/GitHub social login, or enterprise SSO (OIDC / SAML 2.0). Enforce SSO for your team on eligible plans.
  • Public API access — per-project client keys: browser-safe public keys (bq_pk_…) and server-side ID/secret pairs (bq_ci_…/bq_cs_…). Secrets are hashed at rest and shown once.
  • Revoke instantly — delete a compromised key under Project → Integration Credentials; it stops working immediately.
1

Set an origin allowlist on every public key

When creating a bq_pk_… key, list the domains allowed to use it (wildcards like https://*.example.com work). Requests from other origins are rejected.
2

Enable reCAPTCHA v3 for public traffic (optional)

Turn on captcha enforcement in project settings to keep bots from burning your quota through the widget or SDK.
3

Keep secrets server-side

Never ship bq_ci_…/bq_cs_… pairs to browsers or mobile apps — those are for backend integrations only.

Tenant isolation

Workspaces are strict tenants: members, roles, billing, and data are workspace-scoped. Retrieval is always scoped to a single project (or an explicitly permitted set), and every client key is bound to one project — optionally narrowed further to specific source groups.

Control who sees what

Three layers, covered in depth in Roles & Permissions:
  • Workspace roles — owners administer; members’ access is permission-based.
  • Document visibility — mark documents restricted to exclude them from every public surface (widget, SDK, bots, MCP, A2A) while keeping them answerable for your team.
  • Per-key group permissions — a key’s allowed_groups hard-limits what content it can ever retrieve; requests can narrow the scope but never widen it.

Webhook integrity

All inbound webhooks are signature-verified and all outbound webhooks are signed — no configuration needed beyond keeping each secret safe:
Always verify the X-BeforeQuery-Signature header on outbound webhook deliveries before trusting the payload.

Answer guardrails

  • Grounding-only prompting — the model answers only from retrieved sources and refuses when retrieval comes back empty.
  • Citations required — every claim carries [n] markers mapped to real documents, so answers are verifiable.
  • Continuous evaluation — LLM-judge groundedness/faithfulness scoring and hallucination flags; see Analytics & Evals.
  • Rate limiting — per key and per workspace; clients receive 429 with Retry-After.

Protect personal data

  • Turn on PII masking before indexing tickets, chat history, or uploads — masking happens before storage and before any LLM call, with custom per-workspace patterns.
  • Configure retention windows or zero-data-retention mode to match your compliance posture.
  • End-user identity can be a fully opaque ID — no personal data is required for chat.
  • Audit logs record all sensitive workspace actions, including PII-masking events; owners can review them in the dashboard.

Enterprise options

The Enterprise plan adds SAML 2.0, zero-data-retention, white-label widget branding, dedicated ingestion workers, and SLAs. The core stack is also self-hostable — PostgreSQL + pgvector, no proprietary vector database required — for teams with data-residency requirements.