-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52500/
-----------------------------------------------------------

Review request for Ambari, Mahadev Konar, Robert Levas, and Sumit Mohanty.


Bugs: AMBARI-18520
    https://issues.apache.org/jira/browse/AMBARI-18520


Repository: ambari


Description
-------

AMBARI-18520: Ambari usernames should not be converted to lowercase before 
storing in the DB.


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
 e547f058d4270bedf8b10f68311232488d26a7ea 

Diff: https://reviews.apache.org/r/52500/diff/


Testing
-------

** 1. mvn test -DskipPythonTests 
-Dtest=SecurityHelperImplTest,User*Test,UpgradeCatalog240Test **

Results :

Tests run: 95, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.913s
[INFO] Finished at: Mon Oct 03 20:03:48 PDT 2016
[INFO] Final Memory: 57M/866M
[INFO] ------------------------------------------------------------------------

** 2. Manual tests **

Set up a one node cluster with the latest build from trunk and replaced 
ambari-server JAR with the one from the local build.
1. Create a user ABCD. Was able to create the user successfully.
2. Create a user abcd. Unable to create the user.
3. curl -u admin:admin -H "X-Requested-By: ambari" -X GET 
http://localhost:8080/api/v1/users/abcd

{
  "href" : "http://localhost:8080/api/v1/users/abcd";,
  "Users" : {
    "active" : true,
    "admin" : false,
    "groups" : [ ],
    "ldap_user" : false,
    "user_name" : "abcd",
    "user_type" : "LOCAL"
  },
  "privileges" : [ ],
  "widget_layouts" : [ ]
}

curl -u admin:admin -H "X-Requested-By: ambari" -X GET 
http://localhost:8080/api/v1/users/ABCD

{
  "href" : "http://localhost:8080/api/v1/users/ABCD";,
  "Users" : {
    "active" : true,
    "admin" : false,
    "groups" : [ ],
    "ldap_user" : false,
    "user_name" : "abcd",
    "user_type" : "LOCAL"
  },
  "privileges" : [ ],
  "widget_layouts" : [ ]
}


Thanks,

Nahappan Somasundaram

Reply via email to