Skip to content

Commit bfdae11

Browse files
docs: RBAC viewer restrictions + key name validation (#3382, #3378) (#3385)
- 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 Co-authored-by: aegis-gh-agent[bot] <272581873+aegis-gh-agent[bot]@users.noreply.github.com>
1 parent 048560d commit bfdae11

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

docs/api-reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Returns bounded, no-PII diagnostic events from the internal diagnostics bus.
142142

143143
| Role | Required |
144144
|------|----------|
145-
| admin, operator, viewer | Yes |
145+
| admin, operator | Yes |
146146

147147
**Query parameters:**
148148

@@ -229,7 +229,7 @@ Prometheus-compatible metrics scrape endpoint (standard path, no `/v1` prefix).
229229

230230
| Role | Required |
231231
|------|----------|
232-
| admin, operator, viewer | Yes |
232+
| admin | Yes |
233233

234234
```bash
235235
curl http://localhost:9100/metrics \
@@ -331,7 +331,7 @@ curl -X POST http://localhost:9100/v1/auth/keys \
331331

332332
| Parameter | Type | Required | Description |
333333
|-----------|------|----------|-------------|
334-
| `name` | string | yes | Key name |
334+
| `name` | string | yes | Key name (alphanumeric, dots, hyphens, underscores; max 100 chars) |
335335
| `role` | string | yes | One of: `admin`, `operator`, `viewer` |
336336
| `rateLimit` | number | no | Requests per minute |
337337
| `ttlDays` | number | no | Key expiration in days |
@@ -430,7 +430,7 @@ curl -X PATCH http://localhost:9100/v1/auth/keys/key-abc123 \
430430

431431
| Parameter | Type | Required | Description |
432432
|-----------|------|----------|-------------|
433-
| `name` | string | no | New key name (must be unique) |
433+
| `name` | string | no | New key name (alphanumeric, dots, hyphens, underscores; max 100 chars; must be unique) |
434434
| `role` | string | no | New role: `admin`, `operator`, or `viewer` |
435435
| `permissions` | string[]\|null | no | Explicit permissions array, or `null` to reset to role defaults |
436436

@@ -2532,7 +2532,7 @@ Returns aggregated session, token, cost, duration, and error-rate data from the
25322532

25332533
| Role | Required |
25342534
|------|----------|
2535-
| admin, operator, viewer | Yes |
2535+
| admin, operator, viewer | Yes (viewer blocked for non-system tenants) |
25362536

25372537
```bash
25382538
curl http://localhost:9100/v1/analytics/summary \
@@ -2572,7 +2572,7 @@ Returns aggregated cost breakdown by model, key, and daily trends.
25722572

25732573
| Role | Required |
25742574
|------|----------|
2575-
| admin, operator, viewer | Yes |
2575+
| admin, operator, viewer | Yes (viewer blocked for non-system tenants) |
25762576

25772577
```bash
25782578
curl http://localhost:9100/v1/analytics/costs \
@@ -2617,7 +2617,7 @@ Returns aggregated token usage with per-model distribution, daily cost trends, a
26172617

26182618
| Role | Required |
26192619
|------|----------|
2620-
| admin, operator, viewer | Yes |
2620+
| admin, operator, viewer | Yes (viewer blocked for non-system tenants) |
26212621

26222622
```bash
26232623
# Full breakdown
@@ -2661,7 +2661,7 @@ Returns per-key quota usage, global rate-limit config, and a session forecast.
26612661

26622662
| Role | Required |
26632663
|------|----------|
2664-
| admin, operator, viewer | Yes |
2664+
| admin, operator, viewer | Yes (viewer sees only own tenant's keys) |
26652665

26662666
```bash
26672667
curl http://localhost:9100/v1/analytics/rate-limits \
@@ -2832,7 +2832,7 @@ Returns token usage tracking and cost estimation across all sessions.
28322832

28332833
| Role | Required |
28342834
|------|----------|
2835-
| admin, operator, viewer | Yes |
2835+
| admin, operator | Yes |
28362836

28372837
```bash
28382838
curl http://localhost:9100/v1/metrics \
@@ -2973,7 +2973,7 @@ Returns health status for all connected channels (Telegram, Slack, Email, webhoo
29732973

29742974
| Role | Required |
29752975
|------|----------|
2976-
| admin, operator, viewer | Yes |
2976+
| admin, operator | Yes |
29772977

29782978
```bash
29792979
curl http://localhost:9100/v1/channels/health \

0 commit comments

Comments
 (0)