Skip to Content
DBVision

Security Model

Read-only target database enforcement, AES-256-GCM secret encryption, SQLite path isolation, and AI data controls.

DBVision is designed for self-hosted deployments with read-only target database access and encrypted local secret storage.

Read-only target database access

  • Audited execution layer: All target queries pass through the driver port (SELECT / WITH ... SELECT only). Write queries and multi-statement batches are rejected.
  • PostgreSQL: Use a dedicated read-only role with SELECT grants only.
  • MySQL: DBVision inspects SHOW GRANTS and refuses accounts with global write privileges, GRANT OPTION, PROXY, or write privileges on the mysql, sys and performance_schema schemas. Use a dedicated account with SELECT only; queries also run in read-only transactions.
  • SQL Server: DBVision checks effective server and database permissions and refuses write-capable logins.
  • SQLite: Targets are opened read-only and restricted to DBVISION_SQLITE_DIR with symlink and path-traversal checks.

Secret encryption

  • Stored connection passwords, LLM API keys, and sensitive records are encrypted at rest with AES-256-GCM using DBVISION_MASTER_KEY (32 bytes, base64-encoded).
  • If DBVISION_MASTER_KEY is unset, DBVision generates one at <DBVISION_DATA_DIR>/master-key with mode 0600.
  • For production deployments, supply DBVISION_MASTER_KEY from an external secret store so backups of /data do not contain the key alongside the ciphertext.

Authentication and MCP OAuth

  • User sessions and MCP OAuth 2.1 tokens are managed by Better Auth and signed with BETTER_AUTH_SECRET.
  • MCP signing keys are encrypted with BETTER_AUTH_SECRET, rotated every 90 days, and old public keys remain published for 30 days.
  • Dynamic client registration (DCR) is rate-limited to five requests per minute per instance and restricted to public clients with HTTPS or loopback HTTP callbacks.

Network and AI boundaries

  • Testing or opening a connection makes the DBVision server connect to the host and port entered by a signed-in user, including private network hosts. Only grant DBVision accounts to trusted users or restrict outbound network traffic from the container.
  • OpenAI-compatible LLM endpoints on private or loopback networks are blocked unless DBVISION_LLM_ALLOW_PRIVATE_URLS=true.
  • Every connection's AI data mode defaults to Schema only, preventing row values from being sent to LLMs or MCP clients unless explicitly enabled.

On this page