Credential Management
Radarboard stores API credentials in an encrypted database instead of.env files. This enables credential management through the settings UI without server restarts.
How it works
- Encryption: All credentials are encrypted at rest using AES-256-GCM
- Storage: Encrypted data stored in the
widget_credentialstable - Master key: A single
ENCRYPTION_KEYenvironment variable provides the encryption key - Per-service: Each external service has its own credential record (e.g.,
sentry,vercel,linear)
Setting up
Add anENCRYPTION_KEY to your .env:
Credential types
API Key (manual entry)
For services like RevenueCat, Sentry, and BetterStack. Enter the token directly in the Integrations settings tab.OAuth (browser redirect)
For services like GitHub and Google Search Console. The flow:- Enter your OAuth app’s Client ID and Client Secret
- Click “Connect with ”
- Authorize on the provider’s website
- Tokens are stored automatically
For Google: gws CLI shortcut
Instead of creating a Google Cloud OAuth app manually, you can use the Google Workspace CLI:
Adding credentials to a new widget
When creating a new widget, declare its auth requirements in the descriptor:apps/app/lib/oauth-providers.ts.
1Password CLI Backup (optional)
If you use 1Password, you can backup and restore credentials via theop CLI:
- Export to 1Password:
POST /api/credentials/1passwordwith{ action: "export", vault: "Dev" } - Import from 1Password:
POST /api/credentials/1passwordwith{ action: "import", vault: "Dev" }
The 1Password CLI must be installed and authenticated on the server. This only works for local/self-hosted deployments.
Security
- Credentials encrypted with AES-256-GCM (random IV per encryption)
- Master key stored as environment variable (not in database)
- OAuth state parameter prevents CSRF attacks
- Cookies are
httpOnly,secure(production),sameSite: lax - Tokens never appear in URLs or browser history