-
Notifications
You must be signed in to change notification settings - Fork 151
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 handling for group display name (fixes #20344) #557
Fix: SCIM error handling for group display name (fixes #20344) #557
Conversation
Bimsara Bodaragama seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
…values (fixes #20334)
// Error message and SCIM type | ||
String errorMessage = "Updating groups of the role by display name is not supported. " | ||
+ "Update using group id instead."; | ||
String scimType = "invalidSyntax"; // From RFC 7644 Table 9 |
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.
Without hardcoding here you can directly use ResponseCodeConstants.INVALID_SYNTAX constant in charon
scimType variable is also redundant then
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.
Addressed in b974ba9
@@ -1125,7 +1125,13 @@ private void doUpdateGroups(String roleId, Set<String> newGroupIDList, Set<Strin | |||
new ArrayList<>(deleteGroupIDList), tenantDomain); | |||
} catch (IdentityRoleManagementException e) { | |||
if (RoleConstants.Error.INVALID_REQUEST.getCode().equals(e.getErrorCode())) { | |||
throw new BadRequestException(e.getMessage()); | |||
// Error message and SCIM type | |||
String errorMessage = "Updating groups of the role by display name is not supported. " |
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.
Is this the correct place to handle the mentioned error?
Issue should be directly taking display eq ...
something as group id
We have to throw the error from that place
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.
Addressed in b974ba9
…Remove-Add-Replace operations (fixes #20334)
|
||
String value = groupObject.get(SCIMConstants.CommonSchemaConstants.VALUE); | ||
|
||
if (value == null) { |
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.
Shall we use the StringUtils?
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.
Sure
…ty check (fixes #20334)
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