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
{{ message }}
Repository navigation
Server edition: bearer-JWT admin role is trusted from the frozen claim, so admin demotion does not take effect until the token expires #1169
The two auth paths in internal/serveredition/auth/middleware.go derive the admin role differently, and only one of them re-checks the current configuration.
Session path (middleware.go:130, buildAuthContext at :180-185) calls m.teamsConfig.IsAdminEmail(user.Email) on every request.
Bearer-JWT path (middleware.go:172-175) takes the role verbatim from the token claim:
It re-validates that the user still exists and is not Disabled (lines 158-169) — but not their role.
Impact
Removing an address from admin_emails does not take effect for anyone holding a JWT minted while they were an admin. They keep full admin access — every AdminOnly() route, and CanRevealSecrets() — until the token expires (session_ttl, default 24h). Disabling the account does work, so the workaround exists; demotion-without-disabling is the gap.
Suggested fix
Re-derive the role on the bearer path the way the session path does — call buildAuthContext(user) after the existence/disabled checks rather than branching on claims.Role. The user record is already loaded at that point, so there is no extra lookup.
Severity is moderate: it needs a prior admin whose privilege was revoked, and it self-heals at token expiry.
Found during the #1161 residual sweep (#1165); out of scope there.
Activity
fix(serveredition): close the name-collision bypass and stop agent to…
fix(serveredition): read admin_emails live, install the owner gate fi…
fix(security): re-derive JWT admin role and scope agent tokens per ow…
docs(security): add the release advisory for the credential-exposure …
docs(security): drop the server-edition section from the release advi…
Dumbris commentedon Sep 2, 2026
Fixed in #1183 (merged 2026-09-02). GitHub only auto-closed the first reference in that PR's "Closes" line, so closing manually.
feat(serveredition): generic OIDC provider, front door behind an ingr…
feat(scope): IdP-group server grants, one entitlement predicate, tena…
feat(audit): attributable JSONL audit line at every authorization and…