Skip to content

Store multiValued attributes as separate claims instead of comma separated claims #4271

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

Conversation

sadilchamishka
Copy link

@sadilchamishka sadilchamishka commented Mar 22, 2025

Purpose

  • Introduced a method to find the multiValued attributes of the given tenant. It will return the corresponding mapped attribute related to the current user store domain. https://github.com/wso2/carbon-kernel/pull/4271/files#diff-4995941eb71f197712744fdc59e0dd9446e275f592ac931a2630555c0d4b1ec2R5338

  • When retrieving data from the JDBC user store, only the multi valued attributes are concatenated by the multi attribute separator of the corresponding user store domain.

  • When creating or updating a user with multi valued claims, it will be received as comma separated string to the user store manager. As the attributes are stored with same attribute key, all the received multi valued attributes are deleted first. Then add the multi valued attributes which received. (This happen as bulk operations within a single transaction)

  • Iterate over the each multi valued attribute and store as separate attribute.

Related Issues

Depends on

@sadilchamishka sadilchamishka force-pushed the multi-valued-attribute-storage-improvement branch 3 times, most recently from 3383704 to 3fbc290 Compare April 10, 2025 23:30
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 10, 2025
@sadilchamishka sadilchamishka force-pushed the multi-valued-attribute-storage-improvement branch 2 times, most recently from 3d05f1b to b1daea2 Compare April 12, 2025 06:11
@sadilchamishka sadilchamishka force-pushed the multi-valued-attribute-storage-improvement branch from b1daea2 to bf7e108 Compare April 15, 2025 15:15
@jenkins-is-staging
Copy link

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/14473089004
Status: failure

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/14473091953
Status: failure

@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@wso2 wso2 deleted a comment from jenkins-is-staging Apr 16, 2025
@jenkins-is-staging
Copy link

@sadilchamishka
Copy link
Author

sadilchamishka commented Apr 16, 2025

The failing test case is UserSessionMeSuccessTest

Screenshot 2025-04-16 at 11 51 19

The failed test case is an intermittent test case. Verified locally

Screenshot 2025-04-16 at 08 29 36

It has been passed for the different test runs - https://github.com/sadilchamishka/product-is/actions/runs/14483482522/artifacts/2953209554

Screenshot 2025-04-16 at 11 48 57

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/14483635033
Status: failure

@sadilchamishka
Copy link
Author

The PR is merged due to the failing test case is not related to the code changes. The code changes are mostly related user addition flows. The user retrieval flows not get affected as it only engaged for multi valued attributes

@sadilchamishka sadilchamishka merged commit d5f79b9 into wso2:4.10.x Apr 16, 2025
1 check passed
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.

3 participants