Skip to content

dbportal 0.2.0

Choose a tag to compare

@klinux klinux released this 15 Sep 03:37
· 94 commits to main since this release

Second release of dbportal, the one a first round of testing runs against. Everything below is on top of 0.1.0; docs/CONTEXT.md §4 records the design of each item and docs/OPERATOR_GUIDE.md the order to set it up.

Governance on every execution

  • Guardrails: a DELETE or UPDATE without WHERE, a DROP or a TRUNCATE wait for a reviewer; two distinct reviewers where the datasource asks; requests that expire.
  • Limits per datasource: rows, timeout and concurrency. Freeze windows: no write on a datasource between two instants.
  • A ticket or incident reference on every execution, required where the datasource says so. Named roles declared once and used by every datasource list. Environments an administrator keeps.
  • Runbooks: one statement declared once per datasource, run from a form with its values bound. Scripts bounded and transaction control refused on pooled routes.
  • Exports: a rule per datasource, the file built by the server, masked, bounded and audited.
  • Sessions: two hours in use, renewed on the way through, never past twelve from the login.

Bots, agents and the queue

  • The bot API (/api/v1/executions): a bot asks, a reviewer approves (in the portal, or from Slack's Approve/Reject on the announcement), the server runs and answers; the outcome POSTed to a signed callback instead of being polled.
  • An MCP endpoint (/api/mcp) for troubleshooting agents, and an agent deployment role that serves only the two program surfaces.
  • A job queue in the store and a worker role: bot executions, alert runs, seeds, exports and backups run on workers, claimed with SKIP LOCKED, leased and audited. The chart scales workers on the queue's depth with KEDA. A Jobs section in the admin watches the queue: what waits and runs, how long each kind waited and ran, the workers seen, and a ping.

Alerts and the trail

  • Alerts: a read on a schedule with a condition, fired to channels (Slack picked by name, webhooks) declared beside the alerts by anyone within CALLBACK_ALLOWED_HOSTS.
  • Trail alerts: what the audit trail says that someone should hear at once (a guardrail trip, an export off production, a failed backup or seed).
  • The trail read a page at a time, filtered by actor, datasource, result and period; shipped to Elasticsearch; pruned by age. A Prometheus exposition of the portal itself on /api/metrics.

Operations

  • Backups: dump and restore a datasource (PostgreSQL), production dumps copied to a bucket. Seeds: a staging datasource filled from its schema with generated rows, or with a masked sample of another datasource.
  • A Vault KV picker on the datasource sheet. Liveness and readiness probes the chart points at.
  • Image ghcr.io/klinux/dbportal:0.2.0, signed keyless with an SBOM and provenance attached (SECURITY.md says how to verify). Helm chart charts/dbportal 0.1.1 (appVersion 0.2.0), installed from this tag's checkout; role: studio | agent | worker, keda block, config.jobsWorker.
  • The route integration suite runs against a real PostgreSQL in CI.

Docs: docs/OPERATOR_GUIDE.md (from an empty cluster to a team), docs/ARCHITECTURE.md §7 (the topology: three roles, what they share, how each scales), docs/API_DOCS.md, docs/HELM_CHART.md.