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


Fix it, then Ship it!





security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java
Lines 1640 (patched)
<https://reviews.apache.org/r/75293/#comment315375>

    Consider marking following fields as final:
     - useLower
     - useUpper
     - useDigits
     - useSymbols
    
    PasswordGenerator could be an useful class for other purposes as well. 
Consider moving this class to agents-common package, if it doesn't introduce 
any additional dependencies.



security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java
Lines 1738 (patched)
<https://reviews.apache.org/r/75293/#comment315376>

    It is possible that not all catagories will be used, due to use of random 
catagory selection at #1738. Consider replacing #1738 with the following:
    
      int    idxCatagory  = (i < charCategories.size()) ? i : 
secureRandom.nextInt(charCategories.size());
      String charCatagory =  charCategories.get(idxCatagory);



security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java
Line 1071 (original), 1071 (patched)
<https://reviews.apache.org/r/75293/#comment315374>

    For better readablity, consider replacing the 'if' condition:
    
    if (userProfile.getUserSource() != RangerCommonEnums.USER_FEDERATED) {
      if (StringUtils.isBlank(userProfile.getPassword())) {
        userProfile.setUserSource(RangerCommonEnums.USER_EXTERNAL);
      }
    }


- Madhan Neethiraj


On Nov. 30, 2024, 7:22 a.m., Ramesh Mani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75293/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2024, 7:22 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, and Radhika 
> Kundam.
> 
> 
> Bugs: RANGER-5008
>     https://issues.apache.org/jira/browse/RANGER-5008
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> RANGER-5008:Handle creation of federated user in Ranger
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java 
> b98504fd3 
>   security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java 07119dee3 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java cec829361 
>   security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java 
> 647891ef3 
> 
> 
> Diff: https://reviews.apache.org/r/75293/diff/1/
> 
> 
> Testing
> -------
> 
> Testing via Rest API in local cluster.
> 
> curl -ikvvv  -H "Accept: application/json" -H "Content-Type: 
> application/json" --negotiate u : -X POST 
> "https://<hostname>:6182/service/xusers/users" -d '{ "userRoleList": 
> ["ROLE_USER"], "name": "test-1", "firstName": "testing user", "password": "", 
> "userSource": 6 }'
> 
> 
> Thanks,
> 
> Ramesh Mani
> 
>

Reply via email to