-
Notifications
You must be signed in to change notification settings - Fork 152
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: SCIM error message for invalid request values in V1 and V2 Roles Remove-Add-Replace operations (fixes #20334) #559
Fix: SCIM error message for invalid request values in V1 and V2 Roles Remove-Add-Replace operations (fixes #20334) #559
Conversation
…Remove-Add-Replace operations (fixes #20334)
...y.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManager.java
Outdated
Show resolved
Hide resolved
...y.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMRoleManager.java
Outdated
Show resolved
Hide resolved
…rors for SCIM error handling in V2 Roles operations
PR builder started |
@Mock | ||
private RoleManagementService roleManagementService; | ||
@Mock | ||
private SCIMRoleManagerV2 scimRoleManagerV2; |
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.
we should not mock the class which the method we are testing
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.
PR builder completed |
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.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9803713898
|
||
import static org.mockito.Mockito.when; | ||
import static org.mockito.MockitoAnnotations.initMocks; | ||
import static org.testng.AssertJUnit.assertEquals; |
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.
import static org.testng.AssertJUnit.assertEquals; | |
import static org.testng.Assert; |
Let's import org.testng.Assert and use its assertEquals
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.
Fixed by e97c090
Purpose
Fix SCIM error handling to provide appropriate messages when a group display name is used instead of a group ID.
Goals
To ensure compliance with RFC 7644 and provide clear, actionable error messages to users when an invalid request is made with a group display name.
Approach
scimType
set toinvalidSyntax
for requests using a group display name instead of a group ID.detail
field.Issue
Resolves #20334