Skip to content

Add change-client-secret command for authenticated client self-service secret updates#308

Open
duanemay wants to merge 1 commit into
masterfrom
Add-change_client_secret
Open

Add change-client-secret command for authenticated client self-service secret updates#308
duanemay wants to merge 1 commit into
masterfrom
Add-change_client_secret

Conversation

@duanemay

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 11, 2026 22:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-secret Cobra command that calls UAA’s /oauth/clients/{clientId}/secret endpoint.
  • 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.

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

3 participants