Scope admin access to this site with a SITE_ADMINS allowlist #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claw/site-admins-allowlist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Admin access was gated purely on Bio-ID's org-wide
admin/super_adminroles, so letting someone edit this marketing site meant making them an admin of every other insureco service.SITE_ADMINSis set on this service withtawa config setand matches a Bio-ID email (case-insensitive) or bioId. The role check stays as a fallback, so a mistyped allowlist cannot lock the platform team out, and an empty or junk list admits nobody on its own.Also authorizes before minting the session in the OAuth callback — a rejected user was previously left holding a valid cookie that every /admin page then bounced.
Verified:
tsc --noEmitclean; the gate exercised over ten cases (admin role with and without a list, listed email in mixed case, listed bioId, unlisted member, null session, junk list, blank email).🤖 Generated with Claude Code