Skip to main content
Admin Modules

API Credentials

Comprehensive environment variable status dashboard with passphrase-protected value reveal

February 28, 2026

API Credentials

The Credentials page shows every environment variable the Arcturus-Prime platform needs to fully function. Variables are grouped by category with status badges showing whether they’re configured, missing, or using defaults.

Located at /admin/credentials. Admin-only.

Features

Summary Stats

Four stat cards at the top:

  • Total — Number of tracked environment variables (65)
  • Configured — Variables that have a value set (via ENV or KV)
  • Missing — Required variables that are not set
  • Optional — Non-required variables that are not set

Missing Warning Banner

If any required variables are missing, a red banner appears listing their names. This makes it immediately obvious what needs to be configured.

Source Badges

Each variable shows where its value comes from:

  • ENV (blue) — Set in CF Pages environment variables or process.env
  • KV (purple) — Stored in Cloudflare Workers KV (via API key management)
  • MISSING (red) — Not configured anywhere
  • DEFAULT (gray) — Not explicitly set but has a fallback default value

Required/Optional Badges

  • REQ (amber) — Variable is required for core functionality
  • OPT (gray) — Variable is optional or only needed for specific features

Category Cards

Variables are grouped into 14 collapsible categories:

CategoryVariablesExamples
Authentication8ADMIN_EMAILS, CF_ACCESS_AUD, ARGOBOX_SERVICE_TOKEN
AI / LLM Providers8GROQ_API_KEY, OPENROUTER_API_KEY, GEMINI_API_KEY
Voice & Phone6ELEVENLABS_API_KEY, TWILIO_*, BLAND_API_KEY
Web Search2BRAVE_API_KEY, PERPLEXITY_API_KEY
Email2RESEND_API_KEY
Cloudflare6CF_API_TOKEN, CF_ACCOUNT_ID
Git & Content4GITEA_API_TOKEN, GITEA_API_URL
OpenClaw4OPENCLAW_API_TOKEN
AI Workbench2FORGE_RELAY_URL, FORGE_RELAY_SECRET
Argonaut Daemon2ARGONAUT_DAEMON_URL, ARGONAUT_DAEMON_SECRET
Build Swarm4SWARM_ADMIN_KEY, SWARM_CONTROL_KEY
Infrastructure6MM_ARGOBOX_TOKEN, TITAN_ADMINBOX_TOKEN
Pentest Daemons6PENTEST_API_KEY (Tarn-Host/Izar-Host/Sentinel)
Jobs & Misc6AUTOAPPLY_API_KEY, WARMUP_SECRET

Each card shows a count of configured vs total variables, and highlights missing required vars.

Passphrase-Protected Reveal

By default, sensitive values are masked (e.g., sk-or-...abc5). To see actual values:

First-Time Setup

If no passphrase has been set, the page shows a setup form. Enter a passphrase (6+ characters) and confirm it. The passphrase is SHA-256 hashed with a salt and stored in Cloudflare Workers KV.

Unlocking

Enter your passphrase in the unlock bar. On success, all values are revealed with copy-to-clipboard buttons. Values auto-lock after 5 minutes (countdown shown).

Rate Limiting

After 5 failed passphrase attempts, the account is locked out for 15 minutes. The lockout state is tracked in KV with a 1-hour TTL.

Auto-Lock

Revealed values automatically re-lock after 5 minutes. A countdown timer is visible in the passphrase bar. You can also manually lock by clicking the lock button.

Security

The page has multiple security layers:

  1. Cloudflare Access — Route-level authentication
  2. Admin middlewarevalidateAdmin checks JWT and admin email whitelist
  3. Passphrase verification — Additional SHA-256 auth layer for value reveal
  4. Rate limiting — 5 failures → 15 min lockout
  5. Auto-lock — Client-side 5-minute expiry
  6. POST-only reveal — Values never included in GET responses

Environment Variable Testing

The credentials API includes a connectivity test feature that validates whether env vars are set and, where possible, tests live connectivity to the configured services.

How to use

Call the test endpoint from the browser console or any admin context:

POST /api/admin/credentials
{ "action": "test-env" }

To test specific categories only:

POST /api/admin/credentials
{ "action": "test-env", "categories": ["openclaw", "cloudflare", "git"] }

What it tests

For each variable in the registry, the test reports:

StatusMeaning
okVariable is set (and connectivity confirmed where applicable)
missingRequired variable is not set
skippedOptional variable is not set
errorVariable is set but connectivity test failed

Connectivity tests by category

In addition to checking whether each var is set, live connectivity tests run for these categories:

CategoryTestWhat it does
OpenClawGateway connectivityGET /health on OPENCLAW_API_URL with Bearer + CF Access headers
CloudflareCF API token verifyGET /client/v4/user/tokens/verify on Cloudflare API
Git & ContentGitea APIGET /api/v1/user with token auth — returns authenticated username
AI WorkbenchForge RelayGET /health on FORGE_RELAY_URL with Bearer auth
EmailResend APIGET /domains on Resend API to validate the key

All connectivity tests have an 8-second timeout. Categories without a connectivity test (AI providers, Voice, Search, etc.) only report whether each variable is set.

Response format

{
  "results": [
    {
      "categoryId": "openclaw",
      "categoryName": "OpenClaw",
      "tests": [
        { "name": "OPENCLAW_API_TOKEN", "status": "ok", "detail": "Set" },
        { "name": "OPENCLAW_API_URL", "status": "ok", "detail": "Set (default)" },
        { "name": "OPENCLAW_SERVICE_TOKEN_ID", "status": "ok", "detail": "Set" },
        { "name": "OPENCLAW_SERVICE_TOKEN_SECRET", "status": "ok", "detail": "Set" },
        { "name": "Gateway connectivity", "status": "ok", "detail": "200 OK" }
      ]
    }
  ]
}

API

GET /api/admin/credentials

Returns all variables with masked values and summary stats.

{
  "categories": [
    {
      "id": "auth",
      "name": "Authentication",
      "icon": "fa-shield-halved",
      "vars": [
        {
          "name": "ADMIN_EMAILS",
          "description": "Admin email whitelist",
          "required": true,
          "sensitive": false,
          "source": "env",
          "masked": "[email protected]"
        }
      ]
    }
  ],
  "summary": { "total": 65, "configured": 58, "missing": 3, "optional": 4 },
  "passphraseSet": true
}

POST /api/admin/credentials

Set passphrase:

{ "action": "set-passphrase", "passphrase": "your-passphrase" }

Reveal values:

{ "action": "reveal", "passphrase": "your-passphrase" }

Returns the same structure as GET but with value fields included and revealed: true.

Test environment variables:

{ "action": "test-env" }
{ "action": "test-env", "categories": ["openclaw", "cloudflare"] }

Returns per-category test results with variable presence and connectivity checks.

Files

FilePurpose
src/pages/admin/credentials.astroAdmin UI page
src/pages/api/admin/credentials.tsAPI endpoint with variable registry + env test
src/config/modules/credentials.tsModule registration
admincredentialsenvironment-variablessecuritymodule