Closed mevan-karu closed 3 weeks ago
Related issues: https://github.com/wso2/product-is/issues/13055
After this improvement, We are going to build a dynamic query to search for users for given attributes (user-name recovery scenario), we are going to use isCaseSensitiveUsername method to differentiate case-sensitive and insensitive attributes and user names.
Hence, We need to set the CaseInsesitiveUsernames property to false in case DB is case insensitive. We need to use LOWER() indexes to add to the product in case system DB is case-sensitive and case insensitivity support is enabled from the product level.
Moreover, if someone is setting CaseInsensitiveUsername
to false with a case insensitive database like MySQL or MSSQL, the UseCaseSensitiveUsernameForCacheKeys
property also has to be set to false to avoid product keeping case sensitive caches while DB acts case insensitive way.
This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!
Describe the issue:
CaseInsensitiveUernames
property is set totrue
by default from 5.9.0 onwards. This is not properly documented in the IS 5.9.0 documentation [1]. We need to add information about the behavioral change this introduces and what factors to consider when deciding the required behavior the customer's deployment. With this config enabled, set of SQL filter queries are executed with the LOWER() SQL function, which could affect the performance of the system due to not having LOWER() indexes. We've identified the following two cases where performance of the system is degraded.CaseInsesitiveUsernames
is set totrue
. In this case, since the case insensitive usernames in the product is enabled and LOWER() function is added to the SQL filter queries.CaseInsensitiveUsernames
is set totrue
. In this case, DB is case sensitive and customer needs case insensitivity support from the product level. Hence in this case we need to execute the filter queries with the LOWER() function.Suggested solution
Properly document the required guidelines for configuring the
CaseInsensitiveUsername
. For above identified cases;CaseInsesitiveUsernames
property to false in case DB is case insensitive.Following are LOWER() indexes given for a customer, but these indexes needs to be analyzed on whether there are any not required indexes, or missing required indexes and finalize the set of indexes needed. The required guidelines and set of indexes needs to be added to our public documentation.
Affected product versions
[1] https://is.docs.wso2.com/en/5.9.0/setup/migrating-what-has-changed/#storing-the-username-in-consent-management [2] https://is.docs.wso2.com/en/latest/setup/migration-process/ [3] https://is.docs.wso2.com/en/latest/setup/deployment-guide/#configuring-databases