Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"http://wso2.org/claims/streetaddress" claim is duplicated in local claim list #21864

Open
AnuradhaSK opened this issue Dec 1, 2024 · 1 comment · May be fixed by wso2/carbon-identity-framework#6284

Comments

@AnuradhaSK
Copy link
Contributor

Describe the issue:
If you check the local claims list of WSO2 IS, "http://wso2.org/claims/streetaddress" claim is duplicated.

  1. https://github.com/wso2/carbon-identity-framework/blame/66c4d86ce3c60adcdf7bc729a5821e09c78afb6a/features/claim-mgt/org.wso2.carbon.claim.mgt.server.feature/resources/conf/claim-config.xml#L48-L53
			<Claim>
				<ClaimURI>http://wso2.org/claims/streetaddress</ClaimURI>
				<DisplayName>Address</DisplayName>
				<AttributeID>streetAddress</AttributeID>
				<Description>Address</Description>
				<DisplayOrder>4</DisplayOrder>
				<SupportedByDefault />
			</Claim>
  1. https://github.com/wso2/carbon-identity-framework/blame/66c4d86ce3c60adcdf7bc729a5821e09c78afb6a/features/claim-mgt/org.wso2.carbon.claim.mgt.server.feature/resources/conf/claim-config.xml#L402-L408
			<Claim>
				<ClaimURI>http://wso2.org/claims/streetaddress</ClaimURI>
				<DisplayName>Address - Street</DisplayName>
				<AttributeID>streetAddress</AttributeID>
				<Description>Address - Street</Description>
				<DisplayOrder>5</DisplayOrder>
			</Claim>

Since the local claim list is read by the file and put into a Map setting claim URI as the key, the last occurance will be valid.
https://github.com/wso2/carbon-kernel/blob/afaec7b3a43d4ac0fe4a17c078ca29c8fbdb46e4/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/claim/inmemory/FileBasedClaimBuilder.java#L167C21-L167C27

Better to remove the duplicates/ unwanted claims to avoid confusions.

How to reproduce:
Mentioned in the description.

Expected behavior:
Claims list should contain unique claim URIs.

Environment information (Please complete the following information; remove any unnecessary fields) :

  • Product Version: IS-7.1.0-m5
@kumardeepak5
Copy link

Hi @AnuradhaSK
are you currently working on this issue? I’d like to contribute. Could you please confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants