Skip to content

Add configuration option to enable claim description in attribute name for PassiveSTS#8120

Open
KaveeshaPiumini wants to merge 1 commit into
wso2:masterfrom
KaveeshaPiumini:master
Open

Add configuration option to enable claim description in attribute name for PassiveSTS#8120
KaveeshaPiumini wants to merge 1 commit into
wso2:masterfrom
KaveeshaPiumini:master

Conversation

@KaveeshaPiumini

@KaveeshaPiumini KaveeshaPiumini commented May 27, 2026

Copy link
Copy Markdown
Contributor

Proposed changes in this pull request

This pull request introduces support for configuring whether claim descriptions should be included in attribute names for Passive STS. The main changes add a new configuration property and make it available for use in the identity server's configuration.

Configuration enhancements:

  • Added a new constant PASSIVE_STS_ENABLE_CLAIM_DESCRIPTION_IN_ATTRIBUTE_NAME to IdentityConstants.STS for referencing the new configuration property.
  • Updated identity.xml.j2 to include the new <EnableClaimDescriptionInAttributeName> element, allowing the property to be set via configuration templates.

When should this PR be merged

Merge Before

Related Issue

Developer Checklist (Mandatory)

  • Complete the Developer Checklist in the related product-is issue to track any behavioral change or migration impact.

Checklist (for reviewing)

General

  • Is this PR explained thoroughly? All code changes must be accounted for in the PR description.
  • Is the PR labeled correctly?

Functionality

  • Are all requirements met? Compare implemented functionality with the requirements specification.
  • Does the UI work as expected? There should be no Javascript errors in the console; all resources should load. There should be no unexpected errors. Deliberately try to break the feature to find out if there are corner cases that are not handled.

Code

  • Do you fully understand the introduced changes to the code? If not ask for clarification, it might uncover ways to solve a problem in a more elegant and efficient way.
  • Does the PR introduce any inefficient database requests? Use the debug server to check for duplicate requests.
  • Are all necessary strings marked for translation? All strings that are exposed to users via the UI must be marked for translation.

Tests

  • Are there sufficient test cases? Ensure that all components are tested individually; models, forms, and serializers should be tested in isolation even if a test for a view covers these components.
  • If this is a bug fix, are tests for the issue in place? There must be a test case for the bug to ensure the issue won’t regress. Make sure that the tests break without the new code to fix the issue.
  • If this is a new feature or a significant change to an existing feature? has the manual testing spreadsheet been updated with instructions for manual testing?

Security

  • Confirm this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • Are all UI and API inputs run through forms or serializers?
  • Are all external inputs validated and sanitized appropriately?
  • Does all branching logic have a default case?
  • Does this solution handle outliers and edge cases gracefully?
  • Are all external communications secured and restricted to SSL?

Documentation

  • Are changes to the UI documented in the platform docs? If this PR introduces new platform site functionality or changes existing ones, the changes should be documented.
  • Are changes to the API documented in the API docs? If this PR introduces new API functionality or changes existing ones, the changes must be documented.
  • Are reusable components documented? If this PR introduces components that are relevant to other developers (for instance a mixin for a view or a generic form) they should be documented in the Wiki.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 015db039-6f14-4b8a-8ada-aadd33cb792f

📥 Commits

Reviewing files that changed from the base of the PR and between 37eac1e and 9f33aea.

📒 Files selected for processing (2)
  • components/identity-core/org.wso2.carbon.identity.base/src/main/java/org/wso2/carbon/identity/base/IdentityConstants.java
  • features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2

📝 Walkthrough

Walkthrough

This PR adds PassiveSTS configuration support for enabling claim descriptions in attribute names. A new constant is defined in IdentityConstants.STS, and a corresponding configuration element is added to the template configuration file to wire the setting.

Changes

PassiveSTS Claim Description Configuration

Layer / File(s) Summary
PassiveSTS claim description configuration
components/identity-core/org.wso2.carbon.identity.base/src/main/java/org/wso2/carbon/identity/base/IdentityConstants.java, features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2
Added PASSIVE_STS_ENABLE_CLAIM_DESCRIPTION_IN_ATTRIBUTE_NAME constant to IdentityConstants.STS and added the corresponding EnableClaimDescriptionInAttributeName configuration element to the PassiveSTS section in the template configuration.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete relative to the provided template; it lacks most required sections such as Purpose, Goals, Approach, User stories, Release notes, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Migrations, Test environment, and Learning. Complete the PR description by filling in all required sections from the template, including Purpose, Goals, Approach, documentation links, test coverage details, and security verification checkmarks.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding a configuration option for claim description in attribute names for PassiveSTS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.09%. Comparing base (b14eefb) to head (9f33aea).
⚠️ Report is 110 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #8120      +/-   ##
============================================
- Coverage     53.13%   53.09%   -0.04%     
+ Complexity    20746    20727      -19     
============================================
  Files          2151     2151              
  Lines        127284   127287       +3     
  Branches      18745    18745              
============================================
- Hits          67635    67589      -46     
- Misses        51383    51436      +53     
+ Partials       8266     8262       -4     
Flag Coverage Δ
unit 37.85% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

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.

1 participant