Add change-client-secret command for authenticated client self-service secret updates#308
Open
duanemay wants to merge 1 commit into
Open
Add change-client-secret command for authenticated client self-service secret updates#308duanemay wants to merge 1 commit into
change-client-secret command for authenticated client self-service secret updates#308duanemay wants to merge 1 commit into
Conversation
…ice secret updates
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new uaa change-client-secret command to support self-service client secret rotation for the currently authenticated client (client_credentials context), and documents it alongside existing client-management commands.
Changes:
- Introduces
change-client-secretCobra command that calls UAA’s/oauth/clients/{clientId}/secretendpoint. - Adds Ginkgo/Gomega coverage for success, validation failures, zone support, and non-2xx responses.
- Updates command reference and uaac migration docs to point to the new command.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/migrating-from-uaac.md | Documents the new equivalent for uaac secret change. |
| docs/commands/change-client-secret.md | Adds new command documentation page. |
| docs/commands.md | Adds change-client-secret to the command reference list. |
| cmd/change_client_secret.go | Implements the new command, validation, and UAA call. |
| cmd/change_client_secret_test.go | Adds test coverage for the new command behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+53
to
+58
| headers := []string{"Content-Type: application/json"} | ||
|
|
||
| // Add zone header if specified | ||
| if cfg.ZoneSubdomain != "" { | ||
| headers = append(headers, fmt.Sprintf("X-Identity-Zone-Id: %s", cfg.ZoneSubdomain)) | ||
| } |
Comment on lines
+41
to
+44
| requestBody := map[string]interface{}{ | ||
| "oldSecret": oldSecret, | ||
| "secret": newSecret, | ||
| } |
Comment on lines
+1
to
+6
| # uaa change-client-secret | ||
|
|
||
| ## Overview | ||
|
|
||
| Change the secret for the currently authenticated client. This command allows a client to change its own secret by providing both the old secret and the new secret. | ||
|
|
strehle
approved these changes
Jun 13, 2026
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.
No description provided.