Skip to content

docs: RBAC viewer restrictions + key name validation (#3382, #3378)#3385

Merged
aegis-gh-agent[bot] merged 2 commits into
developfrom
docs/rbac-viewer-restrictions-key-validation
May 14, 2026
Merged

docs: RBAC viewer restrictions + key name validation (#3382, #3378)#3385
aegis-gh-agent[bot] merged 2 commits into
developfrom
docs/rbac-viewer-restrictions-key-validation

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

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 only
  • GET /v1/diagnostics: viewer removed → admin, operator only
  • GET /v1/channels/health: viewer removed → admin, operator only
  • GET /metrics (Prometheus): was already admin-only, docs incorrectly listed admin/operator/viewer → admin only
  • GET /v1/analytics/summary, costs, tokens: viewer still allowed but blocked for non-system tenants
  • GET /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/keys name field: documented format (alphanumeric, dots, hyphens, underscores, max 100 chars)
  • PATCH /v1/auth/keys/:id name field: same format restriction

Verification

  • All changes verified against src/routes/health.ts, src/routes/audit.ts, src/routes/analytics.ts, src/validation.ts

- 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

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@aegis-gh-agent aegis-gh-agent Bot merged commit bfdae11 into develop May 14, 2026
17 checks passed
@aegis-gh-agent aegis-gh-agent Bot deleted the docs/rbac-viewer-restrictions-key-validation branch May 14, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant