You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by mo...@apache.org on 2017/11/06 16:29:32 UTC

knox git commit: KNOX-1106 - Tighten the rewrite rule on oozieui to reduce false positives (Wei Han via Sandeep More)

Repository: knox
Updated Branches:
  refs/heads/master 7f58a165f -> 12217b17d


KNOX-1106 -  Tighten the rewrite rule on oozieui to reduce false positives (Wei Han via Sandeep More)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/12217b17
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/12217b17
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/12217b17

Branch: refs/heads/master
Commit: 12217b17d181d995d53e49d48a19baa48f130577
Parents: 7f58a16
Author: Sandeep More <mo...@apache.org>
Authored: Mon Nov 6 11:29:27 2017 -0500
Committer: Sandeep More <mo...@apache.org>
Committed: Mon Nov 6 11:29:27 2017 -0500

----------------------------------------------------------------------
 .../services/oozieui/4.2.0/rewrite.xml          | 27 +++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/12217b17/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 2198b4b..2e04eec 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,13 +16,28 @@
    limitations under the License.
 -->
 <rules>
-    <rule dir="IN" name="OOZIEUI/oozie/inbound/root" pattern="*://*:*/**/oozie/">
-        <rewrite template="{$serviceUrl[OOZIEUI]}/"/>
+    <rule dir="IN" name="OOZIEUI/oozie/inbound/root" flow="OR">
+        <match pattern="http://*:*/**/oozie/">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/"/>
+        </match>
+        <match pattern="https://*:*/**/oozie/">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/"/>
+        </match>
     </rule>
-    <rule dir="IN" name="OOZIEUI/oozie/inbound/path" pattern="*://*:*/**/oozie/{**}">
-        <rewrite template="{$serviceUrl[OOZIEUI]}/{**}"/>
+    <rule dir="IN" name="OOZIEUI/oozie/inbound/path" flow="OR">
+        <match pattern="http://*:*/**/oozie/{**}">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/{**}"/>
+        </match>
+        <match pattern="https://*:*/**/oozie/{**}">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/{**}"/>
+        </match>
     </rule>
-    <rule dir="IN" name="OOZIEUI/oozie/inbound/query" pattern="*://*:*/**/oozie/{**}?{**}">
-        <rewrite template="{$serviceUrl[OOZIEUI]}/{**}?{**}"/>
+    <rule dir="IN" name="OOZIEUI/oozie/inbound/query" flow="OR">
+        <match pattern="http://*:*/**/oozie/{**}?{**}">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/{**}?{**}"/>
+        </match>
+        <match pattern="https://*:*/**/oozie/{**}?{**}">
+            <rewrite template="{$serviceUrl[OOZIEUI]}/{**}?{**}"/>
+        </match>
     </rule>
 </rules>
\ No newline at end of file