Two header types authenticate against bap-engine:Documentation Index
Fetch the complete documentation index at: https://internal.september.wtf/llms.txt
Use this file to discover all available pages before exploring further.
X-Platform-Key— for product calls (most endpoints).X-Admin-Key— for product registration and policy updates.
/health requires neither.
Platform keys
Products call bap-engine using theirX-Platform-Key. The key is
issued at registration:
Validation
On every request, the orchestrator:- Reads the
X-Platform-Keyheader. - Computes SHA-256.
- Looks up
products.api_key_hash. - If no match →
401 INVALID_PLATFORM_KEY. - Otherwise, the product is the calling tenant for the request.
hmac.compare_digest).
Rotation
Today, no built-in rotation endpoint for platform keys. To rotate:- Register a new product with a fresh slug, or
- Manually update
products.api_key_hashwith a new hash, then push the new plaintext to your product’s secret store.
POST /products/{id}/rotate-platform-key.
Admin keys
Two endpoints requireX-Admin-Key on top of (or instead of) the
platform key:
POST /products/registerPUT /products/{product_id}/policy
ORCH_ADMIN_KEY on the orchestrator.
There’s exactly one admin key per orchestrator deployment.
Validation
Plain string compare viahmac.compare_digest. No hash, no
encryption.
Rotation
Trivial:- Generate new value:
python -c 'import secrets; print(secrets.token_urlsafe(48))'. - Update
ORCH_ADMIN_KEYin env. - Restart the orchestrator.
- Update tooling that calls admin endpoints.
Per-engine keys
The orchestrator generates per-engine API keys (sk-sept-<random>) at provision time. These are separate from
platform keys; they’re used by the product to authenticate to the
engine itself, not to the orchestrator.
See Engine contract for how engine
keys flow from orchestrator → product → engine.
What the keys don’t do
- Identify users.
user_idis a string the product picks. The orchestrator doesn’t authenticate the user upstream of the product. - Encrypt traffic. TLS belongs at your reverse proxy.
- Carry scopes. All platform keys can do everything against their own product. Scope at the product layer.
Failure modes
| Status | Code | When |
|---|---|---|
401 | INVALID_PLATFORM_KEY | Header missing or doesn’t match a known product. |
401 | INVALID_ADMIN_KEY | Admin endpoint called without (or with wrong) X-Admin-Key. |
403 | POLICY_DENIED | Key valid but the action isn’t permitted by the product’s policy. |
See also
- Security — how keys live at rest.
- Errors — full error catalog.
- Admin endpoints — registering products, setting policy.

