docs: RBAC viewer restrictions + key name validation (#3382, #3378)#3385
Merged
aegis-gh-agent[bot] merged 2 commits intoMay 14, 2026
Merged
Conversation
- GET /v1/metrics, /v1/diagnostics, /v1/channels/health: viewer removed (admin/operator only) - GET /metrics (Prometheus): was admin-only, docs incorrectly listed admin/operator/viewer - GET /v1/analytics/summary, costs, tokens: viewer tenant-scoped (blocked for non-system tenants) - GET /v1/analytics/rate-limits: viewer sees only own tenant's keys - POST/PATCH /v1/auth/keys: document key name format (KEY_NAME_REGEX: alphanumeric, dots, hyphens, underscores, max 100 chars) Refs: #3382, #3378, #3361, #3364, #3359
Contributor
There was a problem hiding this comment.
✅ Approved. Clean docs-only PR aligning API reference with actual RBAC enforcement.
Verified:
- Correctly removes viewer from
/v1/metrics,/v1/diagnostics,/v1/channels/health, and/metrics(Prometheus) - Properly clarifies tenant-scoped viewer restrictions on analytics endpoints
- Documents key name validation format (alphanumeric, dots, hyphens, underscores; max 100 chars)
- Targets
develop✓ | CI green ✓ | 1 file, +10/-10 ✓
Ready to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes RBAC accuracy gaps from PRs #3382 (viewer isolation) and #3378 (key name validation).
Changes
RBAC viewer restrictions (#3382, #3361)
GET /v1/metrics: viewer removed → admin, operator onlyGET /v1/diagnostics: viewer removed → admin, operator onlyGET /v1/channels/health: viewer removed → admin, operator onlyGET /metrics(Prometheus): was already admin-only, docs incorrectly listed admin/operator/viewer → admin onlyGET /v1/analytics/summary,costs,tokens: viewer still allowed but blocked for non-system tenantsGET /v1/analytics/rate-limits: viewer sees only own tenant's keys (bug: viewer can enumerate all API keys across tenants via /v1/analytics/rate-limits #3359)Key name validation (#3378, #3364)
POST /v1/auth/keysname field: documented format (alphanumeric, dots, hyphens, underscores, max 100 chars)PATCH /v1/auth/keys/:idname field: same format restrictionVerification
src/routes/health.ts,src/routes/audit.ts,src/routes/analytics.ts,src/validation.ts