Open p4535992 opened 8 months ago
The root cause of this issue is that https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/security/authentication/AuthenticationComponentImpl.java#L134 is not using the normalised user name, but the user name as provided during authentication. The normalisation of the user name would have taken care to correct any mismatching case. The case-insensitive setting only affects how user resolution should be treated when authenticating or doing name to user resolutions via public service APIs, but at the lowest level, things are still case sensitive - which is why normalisation matters.
Verified on Alfresco Community 7.4 and 23
The logs of some clients were filled with this error on the rest api calls in the specific case , the service was not going to fail , just filled the logs with this annoying error.
In the specific case to give an example the "List Node Children" call .
The problem we verified stems from the fact that some usernames were created as "PIPPO" while calls to the rest api were made with "pippo," having set the property
user.name.caseSensitive=false
the service prints the error, but then moves on, but by now the error has been printed, if I make the call with "PIPPO" instead of "pippo" on the rest api the error is not printed.
here the problematic line : https://github.com/Alfresco/alfresco-community-repo/blob/1b553dbcaf81fc9835c6b647af8905fc2febecb7/repository/src/main/java/org/alfresco/repo/security/authentication/RepositoryAuthenticationDao.java#L194
It should be
caseUnSensitiveSearchUserName
ifuser.name.caseSensitive=false
no ?Is it possible also for this portion of the code to add ul case unsensitve check of the property ?