You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Myroslav Papirkovskyy <mp...@hortonworks.com> on 2016/02/23 14:05:23 UTC

Re: Review Request 42796: AMBARI-14798: Users cannot login with uppercase username

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


Ship it!




Ship It!

- Myroslav Papirkovskyy


On Лют. 11, 2016, 5:56 після полудня, Oliver Szabo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42796/
> -----------------------------------------------------------
> 
> (Updated Лют. 11, 2016, 5:56 після полудня)
> 
> 
> Review request for Ambari, Myroslav Papirkovskyy, Robert Levas, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-14798
>     https://issues.apache.org/jira/browse/AMBARI-14798
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari DB, every username is stored in lowercase format. If a remote server store users in uppercase format (e.g. an active directory), the user cannot login with using uppercase letters in the username.
> (earlier, in ambari 2.1.2, UI forced to use lowercase username on login)
> 
> Solution: 
> Username converted lowercase on service level: predicate for usernames is defined based on the input of createResource() That is because: before rendering the resources for the response, this predicate has to be evaluated. (in that case: Users/user_name = 'Myuser'. If the response contains user_name = 'myuser', the response resource is filtered out)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java c4403df 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java 6861d3d 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java 80769cf 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java fea5eca 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java 9627d19 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java 269315a 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/UserServiceTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/42796/diff/
> 
> 
> Testing
> -------
> 
> Unit testing done, FT: manually tested
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1:07:55.903s (Wall Clock)
> [INFO] Finished at: Tue Jan 26 13:17:14 CET 2016
> [INFO] Final Memory: 85M/763M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>