Repository navigation
Conversation
list_roles.py shows what each role grants, who holds it, and where a builtin role in the database has drifted from api/rbac/roles.py. list_service_accounts.py shows machine identities with their roles, effective permissions and API keys, including key last use. Both only read the database and support --json for review tickets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two read-only admin scripts that answer the questions RBAC raises day to day, without joining
users,api_keys,user_role,role,role_permissionandproject_memberby hand.scripts/list_service_accounts.pyThe read-only counterpart to
create_service_account.py. For each machine identity it shows its roles, effective permissions, project memberships and API keys, with each key'slast_used_at, so an idle account or key is easy to spot. A service account is one that cannot log in interactively (no password and no SSO link), or that holds theservice_accountrole.--username NAME: one account in full (works on human accounts too)--all: include every account in the inventory--json: machine-readable output for review tickets or comparing tiersscripts/list_roles.pyThe companion question: what does a role actually grant, and who holds it.
--role NAMEfor one in full--diff OTHER: what changing a role toOTHERwould add or removeapi/rbac/roles.py--json, as aboveNotes
--jsonoutput on stdout can be piped straight tojq.🤖 Generated with Claude Code