1. MooseStack
  2. Configuration
  3. Admin API Authentication

On this page

Configuration ReferenceAdmin API Key (Server-Side)Admin Token (Client-Side)

Admin API Authentication

Configure authentication for the Admin API. The Moose CLI uses a plain-text token from your local environment to authenticate against your production instance, which validates it using a stored hash.

Configuration Reference

KeyEnv VariableDefaultDescription
admin_api_keyMOOSE_AUTHENTICATION__ADMIN_API_KEY-Server-side. PBKDF2 hash of the admin token for validating requests.
admin_tokenMOOSE_ADMIN_TOKEN-Client-side. Plain-text token used by the CLI to authenticate against the Admin API.

Admin API Key (Server-Side)

Store the PBKDF2 hash of the admin token on your production instance:

[authentication]# Optional hashed admin API key for auth (Default: None)# admin_api_key = "hashed_api_key"

Or set it as an environment variable:

MOOSE_AUTHENTICATION__ADMIN_API_KEY=your_pbkdf2_hmac_sha256_hashed_key
MooseTip:

The admin_api_key stores a , not the plain-text token. It is safe to commit this hashed value to version control since the Bearer token cannot be derived from it.

PBKDF2 hash

Admin Token (Client-Side)

Store the plain-text token in your local .env.local file. The CLI uses this token to authenticate API requests to your production Admin API:

MOOSE_ADMIN_TOKEN=your_plain_text_token
Warning:

The admin_token contains a plain-text token and must never be committed to version control. Store it only in your git-ignored .env.local file.

FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplates
Changelog
Source506
  • Overview
  • Quick Start
  • Templates / Examples
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
MooseStack in your App
  • App / API frameworks
Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs
Deployment & Lifecycle
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Data Types
  • Table Engines
  • CLI
  • Configuration
    • Core Settings
    • Project Settings
    • TypeScript
    • Telemetry
    • Git
    • Features
    • Migrations
    • Infrastructure
    • ClickHouse
    • Redpanda
    • Redis
    • Temporal
    • HTTP Server
    • State Storage
    • Security
    • JWT
    • Admin API
    • Development
    • Dev Environment
  • Observability Metrics
  • Help
  • Changelog
Contribution
  • Documentation
  • Framework