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




security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java
Lines 197 (patched)
<https://reviews.apache.org/r/74976/#comment314763>

    trim() seems unnecessry for the subsequent contains(). Please review and 
update.
    
    Consider using StringUtils.containsIgnoreCase(entry.getValue(), 
"localhost") instead.



security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java
Lines 201 (patched)
<https://reviews.apache.org/r/74976/#comment314762>

    Consider replacing the exception message with the following:
      "Invalid value for configuration " + entry.getKey() + ": host " + 
url.getHost() + " is not allowed"


- Madhan Neethiraj


On June 5, 2024, 7:43 a.m., Rakesh Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74976/
> -----------------------------------------------------------
> 
> (Updated June 5, 2024, 7:43 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Mehul 
> Parikh, Pradeep Agrawal, and sanket shelar.
> 
> 
> Bugs: RANGER-4782
>     https://issues.apache.org/jira/browse/RANGER-4782
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Implement best coding practices for validating service configs
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java 
> b9d51602e 
>   
> security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/TestConnection.jsx
>  668de52e7 
> 
> 
> Diff: https://reviews.apache.org/r/74976/diff/4/
> 
> 
> Testing
> -------
> 
> Validated Service Connection failed, when using 'localhost' or '127.0.0.1' as 
> the hostname in the service configuration.
> 
> Tested If a service configuration contains a null value, it won't be added to 
> the service.
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>

Reply via email to