feat(api-tokens): make API tokens available on every tier (#1136)

API tokens are credential management, not a tier-gated capability. Remove
the Admiral gate from the POST/GET/DELETE handlers, drop the AdmiralGate
wrapper from the settings UI, set the registry entry's tier to null so the
tab renders on every tier, and update the docs Note to state availability
plainly.

The three permission scopes (read-only, deploy-only, full-admin), the
25-token-per-user cap, the per-token 200 req/min rate limit, the
sen_sk_ prefix format, and the SHA-256 hashed storage are all unchanged.

The Vitest suite now runs at Community tier to prove every code path works
without a paid license. A new "API token tier accessibility" describe block
mints all three scopes via POST /api/api-tokens to lock the behavior.
This commit is contained in:
Anso
2026-05-21 11:45:37 -04:00
committed by GitHub
parent 9090de3a38
commit d0e140444a
5 changed files with 32 additions and 16 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ description: Generate scoped API tokens for CI/CD pipelines, scripts, and automa
---
<Note>
API Tokens require a Sencho **Admiral** license. Skipper and Community Edition do not include this feature.
API tokens are available on every Sencho tier. Each user can create up to 25 active tokens.
</Note>
API tokens let you authenticate external tools (CI/CD pipelines, deployment scripts, monitoring integrations) without sharing user credentials. Each token is scoped to a specific permission level so you can follow the principle of least privilege.
@@ -40,7 +40,7 @@ These restrictions ensure that API tokens cannot escalate privileges or modify t
## Creating a token
1. Open **Settings Hub** and navigate to the **API Tokens** tab (visible to Admiral admins only).
1. Open **Settings Hub** and navigate to the **API Tokens** tab (admin-only).
2. Click **Create Token**.
3. Fill in the creation form:
- **Name**: A descriptive label (e.g., "GitHub Actions deploy")
@@ -49,7 +49,7 @@ These restrictions ensure that API tokens cannot escalate privileges or modify t
4. Click **Create**. A green banner appears with the raw token value. Copy it immediately using the copy button.
<Note>
Each user can have up to **25 active API tokens**. Token names must be unique among your active tokens. If you need to reuse a name, revoke the existing token first.
Token names must be unique among your active tokens. If you need to reuse a name, revoke the existing token first.
</Note>
<Frame>