Add c1i roles list and roles get - #144
Merged
Merged
Conversation
roles list paginates /api/v1/iam/roles as NDJSON rows (id, name, display_name, system_builtin, system_api_only, timestamps); roles get prints one role, including its service roles and permissions. They are where the ids that service-principals credentials create --scoped-role takes come from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
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.
Summary
Adds
c1i roles listandc1i roles get, split out of #143 to keep that PR focused on login.roles listpaginatesGET /api/v1/iam/rolesas NDJSON rows:id,name(e.g.system:viewer),display_name,system_builtin,system_api_only,created_at,updated_at. Bools are real bools, and unset timestamps arenull.roles get <role-id>prints one role, including itsserviceRolesandpermissions.These are where the ids that
service-principals credentials create --scoped-roletakes come from. Before this, onlyc1i api --path /api/v1/iam/rolesreached them.Documented in README (Roles),
cmd/agents.md(Choosing a command), and CHANGELOG.Test plan
go vet,golangci-lint(0 issues),gosec,go test -shuffle=onlistPaginationCases, unwrap case ingetUnwrapCases, and aroleRowtype test (mutation-checked)TestEveryFlagIsDocumented,TestAgentsMDCommandsResolveAgainstCobraTree,TestReadmeCommandsResolveAgainstCobraTree) passroles listreturned every role, with real-bool fields.roles getreturned Basic User with 196 service roles and 10 permissions.^[a-zA-Z0-9]{27}$error.🤖 Generated with Claude Code