Add CLI support for SCIM token management#3375
Open
Amelia Dong (ameliadong97) wants to merge 2 commits into
Open
Add CLI support for SCIM token management#3375Amelia Dong (ameliadong97) wants to merge 2 commits into
Amelia Dong (ameliadong97) wants to merge 2 commits into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
Adds CLI support for organization SCIM token management, wiring new organization scim-token / org scim-token create, list, and delete commands into the existing authenticated Confluent Cloud command tree.
Changes:
- Adds SCIM token create/list/delete command implementations backed by Org v2 SDK calls.
- Adds test-server routes, integration/live tests, and golden fixtures for the new commands.
- Bumps the Org SDK module and updates generator/lint metadata.
Reviewed changes
Copilot reviewed 24 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.cli-generation-checksum |
Updates generated-code checksum. |
cmd/lint/main.go |
Adds vocabulary/proper noun entries for generated command text. |
go.mod |
Bumps ccloud-sdk-go-v2/org to include SCIM token APIs. |
go.sum |
Updates checksums for the bumped Org SDK. |
internal/command.go |
Passes config into the organization command constructor. |
internal/organization/command.go |
Registers the new SCIM token subcommand. |
internal/organization/command_scim_token.go |
Defines shared SCIM token command/output/autocomplete logic. |
internal/organization/command_scim_token_create.go |
Adds SCIM token creation command. |
internal/organization/command_scim_token_delete.go |
Adds SCIM token deletion command. |
internal/organization/command_scim_token_list.go |
Adds SCIM token listing command. |
pkg/ccloudv2/org.go |
Adds Org v2 SCIM token client wrapper methods. |
test/fixtures/input/org/scim_token/create_scim_token.json |
Adds fake create response fixture. |
test/fixtures/input/org/scim_token/read_created_scim_token.json |
Adds fake list response fixture. |
test/fixtures/output/org/scim-token/create-expire-duration-mins.golden |
Adds expected output for create with expiration flag. |
test/fixtures/output/org/scim-token/create.golden |
Adds expected output for default create. |
test/fixtures/output/org/scim-token/delete-invalid.golden |
Adds expected output for invalid delete case. |
test/fixtures/output/org/scim-token/delete-multiple.golden |
Adds expected output for multi-delete confirmation. |
test/fixtures/output/org/scim-token/delete-no-force.golden |
Adds expected output for prompted delete. |
test/fixtures/output/org/scim-token/delete.golden |
Adds expected output for forced delete. |
test/fixtures/output/org/scim-token/list-json.golden |
Adds expected JSON list output. |
test/fixtures/output/org/scim-token/list-yaml.golden |
Adds expected YAML list output. |
test/fixtures/output/org/scim-token/list.golden |
Adds expected human list output. |
test/fixtures/output/organization/help.golden |
Updates organization help to include SCIM token command. |
test/fixtures/output/organization/scim-token/create-help.golden |
Adds create help output. |
test/fixtures/output/organization/scim-token/delete-help.golden |
Adds delete help output. |
test/fixtures/output/organization/scim-token/help.golden |
Adds SCIM token help output. |
test/fixtures/output/organization/scim-token/list-help.golden |
Adds list help output. |
test/live/scim_token_live_test.go |
Adds live CRUD coverage for SCIM tokens. |
test/scim_token_test.go |
Adds integration tests for create/delete/list/autocomplete. |
test/test-server/ccloudv2_router.go |
Registers fake SCIM token API routes. |
test/test-server/scim_token_handler.go |
Adds fake SCIM token API handlers. |
Files not reviewed (6)
- internal/organization/command_scim_token.go: Language not supported
- internal/organization/command_scim_token_create.go: Language not supported
- internal/organization/command_scim_token_delete.go: Language not supported
- internal/organization/command_scim_token_list.go: Language not supported
- test/live/scim_token_live_test.go: Language not supported
- test/scim_token_test.go: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {args: "org scim-token delete id-1 --force", fixture: "org/scim-token/delete.golden"}, | ||
| {args: "org scim-token delete id-1", input: "y\n", fixture: "org/scim-token/delete-no-force.golden"}, | ||
| {args: "org scim-token delete id-1 id-2", input: "y\n", fixture: "org/scim-token/delete-multiple.golden"}, | ||
| {args: "org scim-token delete invalid", fixture: "org/scim-token/delete-invalid.golden", exitCode: 1}, |
| func (s *CLITestSuite) TestOrgScimTokenCreate() { | ||
| tests := []CLITest{ | ||
| {args: "org scim-token create", fixture: "org/scim-token/create.golden"}, | ||
| {args: "org scim-token create --expire-duration-mins 259200", fixture: "org/scim-token/create-expire-duration-mins.golden"}, |
… word Capitalize "organization" to "Organization" in the SCIM token command descriptions and the login long description, and add "mins" to the vocabWords list so --expire-duration-mins passes the word check. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Release Notes
New Features
confluent organization scim-tokencommands to manage SCIM tokens for user provisioning via IdP.Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Applies to: Confluent Cloud only
This PR adds CLI support for SCIM token lifecycle management, enabling customers to create, list, and delete SCIM tokens programmatically.
New Commands:
confluent organization scim-token create [--expire-duration-mins <mins>]- Creates a new SCIM token with optional custom expiration (defaults to 6 months)confluent organization scim-token list- Lists all SCIM tokens for the current organizationconfluent organization scim-token delete <id> [--force]- Deletes a SCIM token by IDImplementation:
Blast Radius
Low impact. This is a new feature with no changes to existing commands.
If something goes wrong:
confluent organization scim-tokencommands would be affectedReferences
Test & Review
Testing completed:
make testpassesmake lintpassesManual verification: Pending testing in dev/stag environment
Local verification: