Repository navigation
Accept a client secret value in the client secret creation request - #1171
sadilchamishka wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 Summary
Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No confirmed issue blocks merging. Confirm that OAuth dependency 7.5.87 supports the new call before release. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Caller-selected credentials introduce security requirements beyond generating a new secret. Application and tenant selection remain unchanged, but supplied-secret validation, failure handling, and compatibility with the required OAuth release are not established. No security vulnerability was verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, the fix, and the dependency on the OAuth release. It omits most sections required by the repository template, including the developer checklist, release note, documentation, tests, security checks, and test environment. Resolution Add the missing template sections and provide the required details. For sections that do not apply, state “N/A” and explain why. Complete the Developer Checklist and include unit and integration test coverage, security-check results, and the test environment. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It compiles only against an unreleased backend change (identity-inbound-auth-oauth#3318) and the required identity.inbound.oauth2.version bump is not in this PR, so merge timing needs human release coordination.
Review effort: Balanced
Findings: None
What changed in this PR
This PR extends the OIDC client-secret creation endpoint (POST /applications/{applicationId}/inbound-protocols/oidc/client-secrets) so a caller can supply an existing secret value instead of always having one generated. This supports carrying over a client secret from another identity provider. It adds an optional secretValue to the request model and threads it through to the backend OAuthAdminServiceImpl.createOAuthClientSecret call; when omitted, behavior is unchanged.
Changes:
- Added an optional
secretValuestring property toClientSecretCreationRequestin the OpenAPI spec and the committed generated model. - Passed
request.getSecretValue()into the backendcreateOAuthClientSecret(...)invocation inOAuthInboundFunctions.
| File | Description |
|---|---|
.../src/main/resources/applications.yaml |
Declares the new optional secretValue property on ClientSecretCreationRequest. |
.../src/gen/java/.../ClientSecretCreationRequest.java |
Generated model updated with the secretValue field, accessors, and equals/hashCode/toString. |
.../core/functions/application/inbound/oauth2/OAuthInboundFunctions.java |
Forwards the supplied secretValue to the backend client-secret creation call. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Issue
POST /applications/{applicationId}/inbound-protocols/oidc/client-secretsaccepts only an expiry, so the secret value is always generated. An application cannot be given an existing secret that has to be carried over from another identity provider.Fix
Adds an optional
secretValuetoClientSecretCreationRequestand passes it through toOAuthAdminServiceImpl.createOAuthClientSecret. When it is omitted the behaviour is unchanged and a secret is generated.Depends on wso2-extensions/identity-inbound-auth-oauth#3318, so this can be merged only after
identity.inbound.oauth2.versionis bumped to a release carrying it.