docs(README): expand RBAC section with fine-grained roles
Build and Push / Test (push) Successful in 8m37s
Build and Push / Build and push image (push) Successful in 34s

Added:
- Two-level access control explanation (capabilities + scopes)
- Scope types table (projects, visibility, owner, groups)
- All built-in roles (admin, portfolio-agent, authenticated-user)
- Owner constraint example (self)
- JWT claims to RBAC mapping
- AccessGuard post-retrieval filtering note
This commit is contained in:
2026-09-03 16:08:56 -07:00
parent bee73036ed
commit 28fe71b8c0
+48 -7
View File
@@ -115,10 +115,34 @@ Agents can cite sources: *"Based on 23 previous occurrences (source: troubleshoo
### 4. Hierarchical RBAC ### 4. Hierarchical RBAC
Fine-grained access control integrated with Authentik OIDC: Two-level access control integrated with Authentik OIDC:
**Level 1: Capabilities** (HTTP endpoint access)
```
memory:read → /query, /context, /projects, /skills
memory:write → /ingest, /learn
* → all endpoints (admin)
```
**Level 2: Resource Scopes** (fine-grained filtering)
| Scope | Description | Example |
|-------|-------------|--------|
| `projects` | Allowed project names | `[homelab, portfolio]` |
| `visibility` | Public or private docs | `public` |
| `owner` | Resource ownership | `self` (own only) |
| `groups` | Required group membership | `[engineering]` |
**Built-in Roles:**
```yaml ```yaml
# Portfolio visitor: public docs only # Admin: full access
- role: admin
rules:
- resources: ["*"]
verbs: [read, write, delete, query]
# Portfolio visitor: public docs only, own conversations
- role: portfolio-agent - role: portfolio-agent
rules: rules:
- resources: [wiki, embedding] - resources: [wiki, embedding]
@@ -126,17 +150,34 @@ Fine-grained access control integrated with Authentik OIDC:
scope: scope:
projects: [homelab, portfolio] projects: [homelab, portfolio]
visibility: public visibility: public
- resources: [conversation]
verbs: [read, write]
scope:
owner: self # Can only access own conversations
# Team member: full project access # Authenticated user: all docs, own conversations
- role: homelab-team - role: authenticated-user
rules: rules:
- resources: [wiki, embedding, skill] - resources: [wiki, embedding, skill]
verbs: [read, write, query] verbs: [read, query]
# No visibility restriction → sees public + private
- resources: [conversation]
verbs: [read, write, delete]
scope: scope:
projects: [homelab] owner: self
``` ```
Agents only retrieve knowledge they're authorized to access. Prevents cross-project data leakage. **JWT Claims → RBAC:**
```json
{
"sub": "alice",
"roles": ["authenticated-user", "homelab-team"],
"groups": ["engineering"],
"permissions": ["memory:read", "memory:write"]
}
```
Agents only retrieve knowledge they're authorized to access. Results are filtered post-retrieval by `AccessGuard`.
### 5. Budget-Aware Context Assembly ### 5. Budget-Aware Context Assembly