Repository: knox Updated Branches: refs/heads/master cf768a74d -> 2dd78920b
KNOX-1177: Retighten the rewrite rule on oozieui to reduce false positives Project: http://git-wip-us.apache.org/repos/asf/knox/repo Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/2dd78920 Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/2dd78920 Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/2dd78920 Branch: refs/heads/master Commit: 2dd78920b940546942cbec33055d9ace996bef38 Parents: cf768a7 Author: Kevin Minder <[email protected]> Authored: Wed Feb 21 14:33:47 2018 -0500 Committer: Kevin Minder <[email protected]> Committed: Wed Feb 21 14:33:47 2018 -0500 ---------------------------------------------------------------------- .../main/resources/services/oozieui/4.2.0/rewrite.xml | 12 ++++++++---- .../main/resources/services/oozieui/4.2.0/service.xml | 8 ++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/knox/blob/2dd78920/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/rewrite.xml ---------------------------------------------------------------------- diff --git a/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/rewrite.xml index 81350c6..7fc5d56 100644 --- a/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/rewrite.xml +++ b/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/rewrite.xml @@ -16,10 +16,14 @@ limitations under the License. --> <rules> - <rule dir="IN" name="OOZIEUI/oozie/root" pattern="*://*:*/**/oozie?{**}"> - <rewrite template="{$serviceUrl[OOZIEUI]}/?{**}"/> + <rule dir="IN" name="OOZIEUI/oozieui/inbound/request/root"> + <match pattern="http://*:*/**/oozie?{**}"> + <rewrite template="{$serviceUrl[OOZIEUI]}?{**}"/> + </match> </rule> - <rule dir="IN" name="OOZIEUI/oozie/path" pattern="*://*:*/**/oozie/{**}?{**}"> - <rewrite template="{$serviceUrl[OOZIEUI]}/{**}?{**}"/> + <rule dir="IN" name="OOZIEUI/oozieui/inbound/request/path"> + <match pattern="*://*:*/**/oozie/{**}?{**}"> + <rewrite template="{$serviceUrl[OOZIEUI]}/{**}?{**}"/> + </match> </rule> </rules> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/knox/blob/2dd78920/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/service.xml ---------------------------------------------------------------------- diff --git a/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/service.xml b/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/service.xml index 1a3f206..8dbe8a7 100644 --- a/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/service.xml +++ b/gateway-service-definitions/src/main/resources/services/oozieui/4.2.0/service.xml @@ -17,7 +17,11 @@ --> <service role="OOZIEUI" name="oozieui" version="4.2.0"> <routes> - <route path="/oozie?**"/> - <route path="/oozie/**?**"/> + <route path="/oozie?**"> + <rewrite apply="OOZIEUI/oozieui/inbound/request/root" to="request.url"/> + </route> + <route path="/oozie/**?**"> + <rewrite apply="OOZIEUI/oozieui/inbound/request/path" to="request.url"/> + </route> </routes> </service>
