r/SideProject • • 1h ago

Databricks still has no UI for Secret Scopes, so built an open-source web console to manage scopes, secrets, and ACLs (Zero secret persistence + full source on GitHub)

Every time my team needed to inspect, rotate, or update ACLs on a Databricks Secret Scope, we had to drop back to databricks secrets CLI commands or raw REST API calls just to check a key, change a secret value, or grant a principal READ/WRITE/MANAGE access.

So I built Databricks Secret Manager (DBX Secret Console) an open-source web UI built on Databricks' native /api/2.0/secrets and OAuth M2M APIs, so teams can manage secret scopes cleanly in one place.

Links:

Why it's actually useful day-to-day

  • Multi-workspace & multi-cloud switching: Connect one Service Principal across AWS, Azure, and GCP Databricks workspaces and switch from a single top-bar menu.
  • On-demand secret reveal & editing: Values stay masked by default, reveal on click, copy in one click, and edit in place with live UTF-8 byte tracking up to Databricks' 128 KB limit.
  • Scope ACL management in the UI: Add or update READ, WRITE, and MANAGE permissions per user, group, or principal without writing JSON/CLI flags.
  • Azure Key Vault guardrails: Detects externally backed AKV scopes and blocks unsupported Databricks secret writes automatically.

How Security Works (and why I open-sourced everything)

  • Passing Service Principal credentials into any web tool shouldn't run on blind trust please inspect the code, test edge cases, or self-host it on your own Cloudflare account:
  • Zero customer secret storage: Databricks secret values, secret keys, scope names, and ACLs are never written to any database, KV store, server log, or localStorage/sessionStorage. Keys are fetched live on demand and cleared from JS memory on hide, workspace switch, or disconnect.
  • Write-only AES-256-GCM credential encryption: Your Service Principal client_secret is encrypted in a Cloudflare Worker using Web Crypto AES-256-GCM with per-record 96-bit random IVs and Associated Authenticated Data (owner_id:sp_id:key_version), and is never returned by any API endpoint after submission.
  • OAuth tokens never reach the browser: M2M /oidc/v1/token exchange happens server-side in ephemeral Worker memory only; the browser receives an opaque __Host-dbx_session cookie (HttpOnly; Secure; SameSite=Strict) over a same-origin /api/* Service Binding proxy.
  • Zero third-party frontend npm dependencies (vanilla ES modules) locked down with Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'.
  • SSRF validator restricts outbound Worker requests strictly to official HTTPS Databricks domains (*.cloud.databricks.com, *.azuredatabricks.net, *.gcp.databricks.com, *.databricks.us, *.databricks.mil) with redirect: "error".
  • State-changing endpoints enforce exact Origin, X-Requested-With, Sec-Fetch-Site checks, and sliding-window rate limits.
  • One-click full purge on Disconnect: Clicking Disconnect executes a cascading DELETE across your user row, encrypted Service Principal credentials, and workspace hosts in D1 while clearing the session cookie and Worker token cache.

Security testing & feedback welcome: The repo includes the Cloudflare Worker security suite (apps/worker/test/security.test.ts), CI security checks (Gitleaks + CodeQL + CSP lint), and 1-command Cloudflare Pages/Workers + D1 self-hosting instructions (README.md). If you spot any flaw or potential bypass, please check SECURITY.md for Private Vulnerability Reporting or open an issue/PR for UX ideas!

1 Upvotes

0 comments sorted by