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

(Updated 六月 13, 2022, 9:17 a.m.)


Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, 
Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Mateen Mansoori, Mehul 
Parikh, Pradeep Agrawal, VaradreawiZTV VaradreawiZTV, Vishal Suvagia, and 
Velmurugan Periasamy.


Changes
-------

change option name


Bugs: RANGER-3623
    https://issues.apache.org/jira/browse/RANGER-3623


Repository: ranger


Description
-------

Currently, we have an option ranger.admin.allow.unauthenticated.access to allow 
unauthenticated clients to perform a series of API operations. This option 
allows the client to perform both dangerous grant/revoke permission operation 
and relatively safe download operation.

In many cases, allowing anonymous downloading of policy/tag/role is not a 
serious risk problem. On the contrary, the complicated kerberos and SSL 
settings make it difficult for ranger plugin embedded in third-party services 
to complete the task of refreshing policy, which may be a bigger problem. In 
particular, refresh failure often has no obvious features for administrators to 
discover.

Therefore, I suggest that ranger increase the ability to allow client to 
download policy/tag/roles anonymously.
There are two ways to achieve it.
 
1. Just limit the ability of  "ranger.admin.allow.unauthenticated.access=true"
which needs to modify 
"security-admin/src/main/resources/conf.dist/security-applicationContext.xml" 
to remove dangerous operations from '
security="none"'.
 
2. Add a candidate value "downloadonly" to 
"ranger.admin.allow.unauthenticated.access"
Which needs modify ServiceRest.Java and BizUtil.java to implement the enhanced 
checking logic. 
 
I have a patch for method2.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java 
252198ae8d2d14e25421fd8e9e778bd4c833d85a 
  security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 
e007676430057a7e632e2dc9813232ec7c8eb5a8 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
58013415cd9bd3ea017442becfcc65d4c3b3c1c4 
  security-admin/src/main/java/org/apache/ranger/rest/TagREST.java 
01df04e3ff9eb4edc7d5b80d405bdcf201335205 
  security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml 
58f434da5014e19511d04bb04462ac752394c858 


Diff: https://reviews.apache.org/r/73846/diff/2/

Changes: https://reviews.apache.org/r/73846/diff/1-2/


Testing
-------

mvn clean build package
fresh install and upgrade.


Thanks,

Kirby Zhou

Reply via email to