Skip to content

Add multiple client secrets support for OAuth/OIDC applications - #10587

Draft
AfraHussaindeen wants to merge 1 commit into
wso2:masterfrom
AfraHussaindeen:master_multiple-client-secrets
Draft

Add multiple client secrets support for OAuth/OIDC applications#10587
AfraHussaindeen wants to merge 1 commit into
wso2:masterfrom
AfraHussaindeen:master_multiple-client-secrets

Conversation

@AfraHussaindeen

@AfraHussaindeen AfraHussaindeen commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Purpose

Introduces a config-gated UI for managing multiple client secrets per OAuth/OIDC application in the Console, enabling seamless secret rotation (generate a new secret, roll over, then delete/expire the old one) without downtime. When the feature is disabled, the existing single-secret experience is untouched.

@AfraHussaindeen
AfraHussaindeen marked this pull request as draft July 28, 2026 02:11
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 15e6be11-bfc9-4608-bdc8-df2519cd0ee3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ create changeset

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.50%. Comparing base (0a908a7) to head (02825c6).
⚠️ Report is 20 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10587      +/-   ##
==========================================
+ Coverage   73.46%   73.50%   +0.03%     
==========================================
  Files         471      471              
  Lines       71454    71559     +105     
  Branches      266      266              
==========================================
+ Hits        52492    52597     +105     
  Misses      18855    18855              
  Partials      107      107              
Files with missing lines Coverage Δ
...18n/src/translations/en-US/portals/applications.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AfraHussaindeen
AfraHussaindeen force-pushed the master_multiple-client-secrets branch from 0151ad8 to 02825c6 Compare July 28, 2026 05:17
"isHeaderAvatarLabelAllowed": false,
"isLeftNavigationCategorized": true,
"isMarketingConsentBannerEnabled": false,
"isMultipleClientSecretsEnabled": true,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since this is primarily related to applications feature, shall we group these isMultipleClientSecretsEnabled and multipleClientSecretsMaxCount under a properties object of applications feature config in order to make config file more cleaner?

eg:

ui: {
  features: {
    applications: {
       enabled: true,
       properties: {
          isMultipleClientSecretsEnabled: true,
          multipleClientSecretsMaxCount: 5
       }
    }
  }
}

"listAllAttributeDialects": true,
"loginFlowCustomFirstFactorAuthenticators": [],
"loginFlowCustomSecondFactorAuthenticators": [],
"multipleClientSecretsMaxCount": 5,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this be 2?

/*
* An empty JSON body is sent so the `application/json` Content-Type is actually transmitted.
* The regenerate-secret endpoint declares `@Consumes(application/json)`; without a body the
* Content-Type is dropped and the request is rejected with 415 Unsupported Media Type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this a newly introduced change? since this is an existing api that has been working well for some time, adding empty body looks unusual.

data: secret,
headers: {
"Accept": "application/json",
"Access-Control-Allow-Origin": store.getState().config.deployment.clientHost,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These CORS headers are to be sent by the server, not client.

https://chatgpt.com/share/6a69869e-7630-83ee-a071-892d39c8c0f0

Suggested change
"Access-Control-Allow-Origin": store.getState().config.deployment.clientHost,

const requestConfig: AxiosRequestConfig = {
headers: {
"Accept": "application/json",
"Access-Control-Allow-Origin": store.getState().config.deployment.clientHost,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"Access-Control-Allow-Origin": store.getState().config.deployment.clientHost,

return {
data,
error: error,
isLoading: !error && !data,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we can take isLoading as well from the useRequest custom hook itself.

*/

.secret-expiry-banner-wrapper {
margin-bottom: 1rem;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we can pass this through sx prop and get rid of this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants