This is an automated email from the ASF dual-hosted git repository.
krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new 232c422 KNOX-1963 - Ranger API service should proxy xusers/users and
and xusers/groups
232c422 is described below
commit 232c42260313005502fff19d81cbe47f2b653848
Author: Vishal Suvagia <[email protected]>
AuthorDate: Fri Aug 2 18:21:20 2019 +0530
KNOX-1963 - Ranger API service should proxy xusers/users and and
xusers/groups
Changes:
Added Request paths in the Knox Ranger service definition allowed paths and
rewrite rules.
Testing:
Verified that the calls to the allowed path are accessible through proxy.
Signed-off-by: Kevin Risden <[email protected]>
---
.../src/main/resources/services/ranger/1.0.0/rewrite.xml | 6 ++++++
.../src/main/resources/services/ranger/1.0.0/service.xml | 2 ++
2 files changed, 8 insertions(+)
diff --git
a/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/rewrite.xml
index 5683f8e..e53e9cb 100644
---
a/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/rewrite.xml
+++
b/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/rewrite.xml
@@ -21,6 +21,12 @@
<rule dir="IN" name="RANGER/ranger/inbound/plugins"
pattern="*://*:*/**/ranger/service/plugins/{path=**}?{**}">
<rewrite
template="{$serviceUrl[RANGER]}/service/plugins/{path=**}?{**}"/>
</rule>
+ <rule dir="IN" name="RANGER/ranger/inbound/plugins"
pattern="*://*:*/**/ranger/service/xusers/users/{path=**}?{**}">
+ <rewrite
template="{$serviceUrl[RANGER]}/service/xusers/users/{path=**}?{**}"/>
+ </rule>
+ <rule dir="IN" name="RANGER/ranger/inbound/plugins"
pattern="*://*:*/**/ranger/service/xusers/groups/{path=**}?{**}">
+ <rewrite
template="{$serviceUrl[RANGER]}/service/xusers/groups/{path=**}?{**}"/>
+ </rule>
<rule dir="IN" name="RANGER/ranger/inbound/healthcheck"
pattern="*://*:*/**/ranger">
<rewrite template="{$serviceUrl[RANGER]}"/>
</rule>
diff --git
a/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/service.xml
b/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/service.xml
index 78b485e..47c377b 100644
---
a/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/service.xml
+++
b/gateway-service-definitions/src/main/resources/services/ranger/1.0.0/service.xml
@@ -18,6 +18,8 @@
<routes>
<route path="/ranger/service/public/**"/>
<route path="/ranger/service/plugins/**"/>
+ <route path="/ranger/service/xusers/users/**"/>
+ <route path="/ranger/service/xusers/groups/**"/>
<route path="/ranger"/>
</routes>
<dispatch classname="org.apache.knox.gateway.dispatch.DefaultDispatch"/>