Description
Sometimes you need to use sAMAccountName instead of userPrincipalName in your search.
However, this is hard-coded in a private method
https://github.com/apache/shiro/blob/master/core/src/main/java/org/apache/shiro/realm/activedirectory/ActiveDirectoryRealm.java#L171
See here for a similar question on stackoverflow
http://stackoverflow.com/questions/24062383/shiro-ldap-authorization-config/34896329#34896329
There is a similar bug in Spring Security
https://github.com/spring-projects/spring-security/issues/2448
Making the search query was configurable in the shiro.ini would be useful.
Making the getRoleNamesForUser protected instead of private would make sub-classing easier.
Or keep the method private but make a protected method that returns Object[] searchArguments.
Attachments
Issue Links
- links to