docs(buglog): follow-ups fixed (bug-1958..bug-1966); log bug-1967 (limit config re-push)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f389845701
commit
f51adebe8e
11 changed files with 251 additions and 117 deletions
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
id: "bug-1958"
|
||||
status: "open"
|
||||
status: "fixed"
|
||||
status_updated: "2026-10-10"
|
||||
status_note: "newly logged"
|
||||
status_note: ""
|
||||
component: "apiserver"
|
||||
severity: "security"
|
||||
timestamp: "2026-10-10T10:15:56Z"
|
||||
|
|
@ -11,6 +11,7 @@ occurrences: 1
|
|||
files: ["src/frontend/apiserver/controllers/roles.go"]
|
||||
tags: ["apiserver", "security", "rbac"]
|
||||
related: ["bug-1952"]
|
||||
fix_commits: ["736ed81d"]
|
||||
gitea_issue: 389
|
||||
gitea_synced_status: "open"
|
||||
gitea_synced_hash: "499c8864257a"
|
||||
|
|
@ -39,15 +40,16 @@ Reported by the bug-1952 fix: role create/update in `controllers/roles.go` accep
|
|||
- Frequency: deterministic (by code reading; confirmed by the RED test of the fix)
|
||||
- Evidence: the code sites quoted in Description; no logs kept.
|
||||
## Root cause
|
||||
TODO: required for fixed/partial
|
||||
`CreateRole`, `AddPermissionsForRole` and `DeleteRoleAndPermissions` (`controllers/roles.go`) were guarded only by the route's `RequirePermission("rbac:control")`, which accepts any scope, so a `self`-scoped grant could add `cluster:control` to a role its holder has. Pre-existing.
|
||||
|
||||
## Fix
|
||||
TODO: required for fixed/partial
|
||||
New `checkRoleChangePermission()` in `roles.go`, called first in the three handlers, reuses `canChangeUserRoles` (bug-1952; all grants before deduplication) and answers 403 unless the caller holds `rbac:control` with scope `all`.
|
||||
|
||||
## Verification
|
||||
- Test: TODO: name + file; RED before the fix, GREEN after
|
||||
- Suites: TODO: suite results and build profile
|
||||
- Live: TODO: soak/deploy run, or n/a and why
|
||||
- Test: `TestAddPermissionsForRole_SelfScopeCannotExtendOwnRole` (`controllers/roles_rbac_test.go`): RED `roles_rbac_test.go:65: privilege escalation: mallory (rbac:control scope self) added cluster:control to its own role (status 200)`; `TestCreateRole_SelfScopeRejected`, `TestDeleteRole_SelfScopeRejected` RED (status 200, want 403); GREEN after, plus `TestRoleChanges_AllScopeAllowed`.
|
||||
- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)
|
||||
- Live: n/a: unit/fixture-level verification; no live deployment was run
|
||||
|
||||
## References
|
||||
- Related: none
|
||||
- Fix commits: `736ed81d` (on `scheduler-framework`)
|
||||
- Found as a follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue