> On Nov. 8, 2016, 3:51 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java, > > line 80 > > <https://reviews.apache.org/r/53583/diff/1/?file=1556764#file1556764line80> > > > > Out of curiousity, can LDAP contain non-latin characters which might > > not convert properly to lowercase? > > Robert Levas wrote: > I suppose non-latin characters are a possibly, but I don't think we > typically see that. Also, if this was an issue we would have bigger problems > since the default charater set for MySQL is LATIN1. > > ``` > mysql> SELECT T.table_schema, T.table_name, CCSA.character_set_name FROM > information_schema.`TABLES` T, > -> information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` > CCSA > -> WHERE CCSA.collation_name = T.table_collation > -> AND T.table_schema = "ambari" > -> AND T.table_name = "users"; > +--------------+------------+--------------------+ > | table_schema | table_name | character_set_name | > +--------------+------------+--------------------+ > | ambari | users | latin1 | > +--------------+------------+--------------------+ > 1 row in set (0.00 sec) > ```
Actually, many MySQL installations (especially those 5.6 and greater) are done with UTF-8 as a charset. It's just something I always think about when using toLowerCase() ... - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53583/#review155354 ----------------------------------------------------------- On Nov. 8, 2016, 2:09 p.m., Robert Levas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53583/ > ----------------------------------------------------------- > > (Updated Nov. 8, 2016, 2:09 p.m.) > > > Review request for Ambari, Jonathan Hurley, Laszlo Puskas, Nate Cole, and > Sebastian Toader. > > > Bugs: AMBARI-18813 > https://issues.apache.org/jira/browse/AMBARI-18813 > > > Repository: ambari > > > Description > ------- > > Optionally force username from LDAP authentication data to be lowercase in > Ambari based on LDAP import configuration. > > In some cases the username declared in the relevant LDAP object is in all > uppercase characters when the local Hadoop cluster expects the username to be > all lowercase. As of Ambari 2.4.0, the username specified from the LDAP data > is used to override the username known to Ambari. This overwritten data may > be in all uppercase characters, potentially breaking local username > conventions. > > To help this scenario, provide a configuration option to force the username > obtained from the LDAP object to be converted to all lowercase character. > > For example `authentication.ldap.username.forceLowercase`. > > This optional configuration value is to default to false to maintain current > functionality. > > > Diffs > ----- > > ambari-server/docs/configuration/index.md 52b4744 > > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java > 3103b6d > > ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticator.java > 917471b > > ambari-server/src/main/java/org/apache/ambari/server/security/authorization/LdapServerProperties.java > a3086693 > > ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java > 6e4b836 > > Diff: https://reviews.apache.org/r/53583/diff/ > > > Testing > ------- > > Manually tested... > > # Local test results: > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 37:51.683s > [INFO] Finished at: Tue Nov 08 10:51:17 EST 2016 > [INFO] Final Memory: 62M/834M > [INFO] > ------------------------------------------------------------------------ > > # Jenkins test result: PENDING > > > Thanks, > > Robert Levas > >
