Skip to content

Client Secret and Secret Rotated are always the same#50137

Open
mabartos wants to merge 1 commit into
keycloak:mainfrom
mabartos:KC-49342
Open

Client Secret and Secret Rotated are always the same#50137
mabartos wants to merge 1 commit into
keycloak:mainfrom
mabartos:KC-49342

Conversation

@mabartos

Copy link
Copy Markdown
Member

OLD

Screencast.From.2026-06-18.18-13-38.mp4

NEW

Screencast.From.2026-06-18.18-11-35.mp4

@edewit @rmartinc Could you please check it? Thanks!

…always the same

Closes keycloak#49342

Closes keycloak#50134

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
@mabartos mabartos requested a review from edewit June 18, 2026 16:19
@mabartos mabartos requested a review from a team as a code owner June 18, 2026 16:19
Copilot AI review requested due to automatic review settings June 18, 2026 16:19
@mabartos mabartos requested a review from a team as a code owner June 18, 2026 16:19
@mabartos mabartos changed the title Client secret rotation feature. Client Secret and Secret Rotated are always the same Client Secret and Secret Rotated are always the same Jun 18, 2026

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

This PR fixes Admin Console client secret rotation rendering in the Clients → Credentials tab so that the “Secret Rotated” value is no longer bound to the same form field as “Client Secret”, and ensures the UI refreshes after rotated-secret invalidation.

Changes:

  • Passes refresh() into the client secret credentials section so child components can refetch client data after mutations.
  • Removes duplicated local state for rotated secret and derives it directly from client.attributes.
  • Refreshes client data after invalidating the rotated secret and renders the rotated secret as a read-only value (preventing it from being tied to the "secret" form control).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
js/apps/admin-ui/src/clients/credentials/Credentials.tsx Wires refresh into the client secret UI so downstream actions can refetch client data.
js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx Fixes rotated secret display by avoiding binding it to the "secret" form control; refreshes after invalidation.

Comment on lines 28 to 32
type SecretInputProps = ClientSecretProps & {
id: string;
buttonLabel: string;
isReadOnly?: boolean;
};
Comment on lines 153 to 160
<SecretInput
id="kc-client-secret"
client={client}
secret={secret}
toggle={toggle}
refresh={refresh}
buttonLabel="regenerate"
/>
Comment on lines 168 to 176
<SecretInput
id="secretRotated"
client={client}
secret={secretRotated}
toggle={toggleInvalidateConfirm}
refresh={refresh}
buttonLabel="invalidateSecret"
isReadOnly
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants