Skip to main content

API Keys Management

API keys provide service-to-service authentication for integrations, scripts, and external systems.

When to use API keys vs. JWT

Use CaseRecommended AuthReason
Dashboard loginJWTInteractive, session-based
SIEM integrationAPI KeyLong-running service
CI/CD pipelineAPI KeyAutomated, non-interactive
Custom scriptsAPI KeyNo login flow needed
Mobile appJWTUser-specific sessions
Webhook receiverAPI KeyStateless verification

Key format

Generated API keys follow this format:

aurora_<64_random_hex_characters>

Authentication

Pass the API key in the X-API-Key header:

curl -H "X-API-Key: aurora_abc123..." http://localhost:8000/api/v1/alerts

Key lifecycle

  1. An admin creates a key with a name and optional expiry date.
  2. The full key is shown once at creation. Store it securely.
  3. Keys can be revoked at any time by an admin.
  4. Revoked keys are rejected on the next request.

Security notes

  • API keys are stored hashed in the database, not in plaintext.
  • Keys inherit the permissions of the role they are assigned to.
  • Rotate keys regularly, especially after team changes.
  • Never commit API keys to version control.