You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Ramesh Mani <rm...@hortonworks.com> on 2017/06/21 00:04:02 UTC
Review Request 60256: RANGER-1658: Solr gives NPE while printing the
AuthorizationContext in INFO and DEBUG log
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60256/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
Bugs: RANGER-1658
https://issues.apache.org/jira/browse/RANGER-1658
Repository: ranger
Description
-------
RANGER-1658: Solr gives NPE while printing the AuthorizationContext in INFO and DEBUG log
Diffs
-----
plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java bf22b47
Diff: https://reviews.apache.org/r/60256/diff/1/
Testing
-------
Testing done with Local VM
Thanks,
Ramesh Mani
Re: Review Request 60256: RANGER-1658: Solr gives NPE while printing
the AuthorizationContext in INFO and DEBUG log
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60256/#review178909
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On June 21, 2017, 12:04 a.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60256/
> -----------------------------------------------------------
>
> (Updated June 21, 2017, 12:04 a.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-1658
> https://issues.apache.org/jira/browse/RANGER-1658
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-1658: Solr gives NPE while printing the AuthorizationContext in INFO and DEBUG log
>
>
> Diffs
> -----
>
> plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java bf22b47
>
>
> Diff: https://reviews.apache.org/r/60256/diff/1/
>
>
> Testing
> -------
>
> Testing done with Local VM
>
>
> Thanks,
>
> Ramesh Mani
>
>
Re: Review Request 60256: RANGER-1658: Solr gives NPE while printing
the AuthorizationContext in INFO and DEBUG log
Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60256/#review178452
-----------------------------------------------------------
It might be better to ecapsulate following code into a function, then call it. These codes are functionally independent. And the logAuthorizationConext function had included lots of line code.
RequestType requestType = context.getRequestType();
String accessType = mapToRangerAccessType(context);
Principal principal = context.getUserPrincipal();
String contextString = new String("AuthorizationContext: ");
contextString = contextString + "context.getResource()= " + ((resource != null ) ? resource : "");
contextString = contextString + ", solarParams= " + (( solrParams != null ) ? solrParams : "");
contextString = contextString + ", requestType= " + (( requestType != null ) ? requestType : "");
contextString = contextString + ", ranger.requestType= " + ((accessType != null ) ? accessType : "");
contextString = contextString + ", userPrincipal= " + ((principal != null ) ? principal : "");
contextString = contextString + ", userName= " + userName;
contextString = contextString + ", groups= " + groups;
contextString = contextString + ", ipAddress= " + ipAddress;
contextString = contextString + ", collections= " + collections;
contextString = contextString + ", headers= " + headers;
- Qiang Zhang
On 六月 21, 2017, 12:04 a.m., Ramesh Mani wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60256/
> -----------------------------------------------------------
>
> (Updated 六月 21, 2017, 12:04 a.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-1658
> https://issues.apache.org/jira/browse/RANGER-1658
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RANGER-1658: Solr gives NPE while printing the AuthorizationContext in INFO and DEBUG log
>
>
> Diffs
> -----
>
> plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java bf22b47
>
>
> Diff: https://reviews.apache.org/r/60256/diff/1/
>
>
> Testing
> -------
>
> Testing done with Local VM
>
>
> Thanks,
>
> Ramesh Mani
>
>