-
Notifications
You must be signed in to change notification settings - Fork 545
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
fix scim2 group & role issue #4824
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3759fe5
fix scim2 group & role issue
DilshanSenarath 84964da
fix the seperator issue
DilshanSenarath 0a74fb0
Merge branch 'wso2:master' into dilshan
DilshanSenarath a648f7a
add a comment
DilshanSenarath ebb5f73
update the comment
DilshanSenarath 4a4d763
update the comment
DilshanSenarath a15fe68
update the comment according to the suggestion
DilshanSenarath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is not very clear. You are trying to throw the error message "A role doesn't exist with id: " + roleID + " in the tenant domain: " + tenant domain, if the role name is null or the role name does not start with "Application" or "Internal". But from this method, we are trying to get the role name by passing the role id to the table IDN_SCIM_GROUP. So based on the logic if we get a role that does not contain the prefix "Application" or "Internal" it will throw an error. Is this expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the current implementation, IDN_SCIM_GROUP table stores both roles and groups. This group endpoint code (https://github.com/wso2-support/identity-inbound-provisioning-scim2/blob/645b50a897929cd5cb3d32c5a1af3b6c9c6b933c/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java#L2620-L2624) uses this method (https://github.com/wso2-support/identity-inbound-provisioning-scim2/blob/645b50a897929cd5cb3d32c5a1af3b6c9c6b933c/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java#L2744) to differentiate between roles and groups in the same table. Since we should only get roles name (Exclude group names), we have to do a filtering. That's why I have included this logic.