wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 729 forks source link

Performance Impact of Role Retrieval Operation #21789

Open Manchiz opened 1 day ago

Manchiz commented 1 day ago

Describe the issue: It was observed that due to PR [1] for the fix [2], the internal/everyone role is included in scimDisabledHybridRoles [3]. As a result, while retrieving users belonging to roles in [4], it attempts to retrieve all users belonging to internal/everyone roles. This has introduced significant delays in role retrieval operations (e.g., SCIM2/Groups GET).

  1. https://github.com/wso2-support/identity-inbound-provisioning-scim2/pull/157

  2. https://github.com/wso2/product-is/issues/11249

  3. https://github.com/wso2-extensions/identity-inbound-provisioning-scim2/blob/8d52f53cd945e10bcdc3a37dd40c4cf21e36a066/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java#L3148

  4. https://github.com/wso2/carbon-kernel/blob/9b1a0081d325bc7c509108ca24c83484f9b4835b/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java#L10949

Expected behavior: The internal/everyone role needs to be excluded from [3].

Environment information (Please complete the following information; remove any unnecessary fields) :