You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: qualify all admin bypass statements by token type
Fix remaining stale references that described admin bypass without
distinguishing API/legacy tokens from session tokens:
- AGENTS.md:112 — security invariant now references both
normalize_token_teams() and resolve_session_teams()
- multitenancy.md:1247 — enforcement summary now qualifies admin
bypass per token type
- rbac.md:246 — "Explicit Admin Bypass" section split by token type
- rbac.md:639 — scoping strategy table corrected for session tokens
Closes#3003
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ ContextForge implements a **two-layer security model**:
109
109
- Keep the two-layer model on every path:
110
110
- Layer 1: token scoping controls what a caller can see.
111
111
- Layer 2: RBAC controls what a caller can do.
112
-
- Do not re-implement token team interpretation logic; always use `normalize_token_teams()` in `mcpgateway/auth.py`.
112
+
- Do not re-implement token team interpretation logic; use `normalize_token_teams()`for API/legacy tokens and `resolve_session_teams()` for session tokens (both in `mcpgateway/auth.py`).
113
113
- Do not accept inbound client auth tokens via URL query parameters.
114
114
- Legacy `INSECURE_ALLOW_QUERYPARAM_AUTH` is interop-only for outbound peer auth and must remain opt-in and host-restricted.
115
115
- High-risk transports must be feature-flagged and disabled by default.
Copy file name to clipboardExpand all lines: docs/docs/architecture/multitenancy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1244,7 +1244,7 @@ These behaviors are enforced consistently across all access paths:
1244
1244
1245
1245
1.`normalize_token_teams()` is the canonical interpreter of JWT team claims; `resolve_session_teams()` is the single policy point for session tokens (always DB-resolved)
3. Admin bypass requires BOTH `teams: null` AND `is_admin: true`, and both `token_teams=None` AND `user_email=None`in the service layer
1247
+
3. Admin bypass for API/legacy tokens requires BOTH `teams: null` AND `is_admin: true`; for session tokens, admin bypass is DB-derived (`is_admin` flag). In both cases the service layer requires `token_teams=None` AND `user_email=None`for unrestricted queries
1248
1248
4. Empty teams list (`[]`) results in public-only access, even for admins
1249
1249
5. All list endpoints pass `token_teams` to the service layer
1250
1250
6. Service layer applies visibility filtering based on `token_teams` via `BaseService._apply_access_control()`
0 commit comments