product-is icon indicating copy to clipboard operation
product-is copied to clipboard

Password update times out due to user id search among all the userstores

Open rksk opened this issue 2 years ago • 0 comments

Describe the issue: It was observed that when there are multiple userstores in the system, user id is searched on all the user stores during the doPostUpdateCredentialByAdminWithID event for non-uniqueID userstores.

At [1], the userstore object contains an instance from the correct userstore in which user resides. But the flow goes on and extractedDomain is null at [2], then it again searches for this user id on all the userstores.

How to reproduce: Create multiple userstores with non-uniqueID classes and try to update password in one user from any userstore.

Expected behavior: It should not search on all the user stores during the post events since we already know that where the user resides.

Environment information

  • Product Version: IS 5.10.0

[1]https://github.com/wso2-extensions/identity-inbound-provisioning-scim2/blob/368ad229e124bfdb814972918bcc74bf5e314199/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/listener/SCIMUserOperationListener.java#L130-L131

[2] https://github.com/wso2/carbon-kernel/blob/d7e842fdf676e2106436868d79f605f5ee001f93/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java#L2866-L2929

rksk avatar Sep 22 '22 11:09 rksk