knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject knox git commit: KNOX-788 - Apache Atlas Admin UI Support through Knox (Nixon Rodrigues via Sandeep More)
Date Fri, 07 Jul 2017 18:24:46 GMT
Repository: knox
Updated Branches:
  refs/heads/master 83b17a5d5 -> bd4330cf8


KNOX-788 - Apache Atlas Admin UI Support through Knox (Nixon Rodrigues 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/bd4330cf
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/bd4330cf
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/bd4330cf

Branch: refs/heads/master
Commit: bd4330cf8f37ecfd8f9c5d8101316db3868096cb
Parents: 83b17a5
Author: Sandeep More <more@apache.org>
Authored: Fri Jul 7 14:16:49 2017 -0400
Committer: Sandeep More <more@apache.org>
Committed: Fri Jul 7 14:16:49 2017 -0400

----------------------------------------------------------------------
 .../resources/services/atlas/0.8.0/rewrite.xml  | 83 ++++++++++++++++++++
 .../resources/services/atlas/0.8.0/service.xml  | 51 ++++++++++++
 2 files changed, 134 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/bd4330cf/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/rewrite.xml
new file mode 100644
index 0000000..9db2348
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/rewrite.xml
@@ -0,0 +1,83 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+
+<rules>
+    <!-- inbound rules -->
+    <rule dir="IN" name="ATLAS/atlas/inbound/root" pattern="*://*:*/**/atlas/">
+        <rewrite template="{$serviceUrl[ATLAS]}/"/>
+    </rule>
+
+
+    <rule dir="IN" name="ATLAS/atlas/inbound/path" pattern="*://*:*/**/atlas/{**}">
+        <rewrite template="{$serviceUrl[ATLAS]}/{**}"/>
+    </rule>
+
+
+    <rule dir="IN" name="ATLAS/atlas/inbound/query" pattern="*://*:*/**/atlas/{**}?{**}">
+        <rewrite template="{$serviceUrl[ATLAS]}/{**}?{**}"/>
+    </rule>
+
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/links" pattern="css/{**}">
+        <rewrite template="{$frontend[path]}/atlas/css/{**}"/>
+    </rule>
+
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/links" pattern="js/{**}">
+        <rewrite template="{$frontend[path]}/atlas/js/{**}"/>
+    </rule>
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/styles" pattern="img/{**}">
+        <rewrite template="{$frontend[path]}/atlas/img/{**}"/>
+    </rule>
+
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/contextpath">
+        <rewrite template="{$frontend[path]}/atlas/"/>
+    </rule>
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/extrapath">
+        <rewrite template="{$frontend[topology]}/atlas/j_spring_security_check"/>
+    </rule>
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/index">
+        <rewrite template="{$frontend[path]}/atlas/index.html"/>
+    </rule>
+
+    <rule dir="OUT" name="ATLAS/atlas/outbound/login/headers/location">
+        <match pattern="*://*:*/login.jsp"/>
+        <rewrite template="{$frontend[url]}/atlas/login.jsp"/>
+    </rule>
+
+
+    <filter name="ATLAS/atlas/outbound/links">
+        <content type="application/javascript">
+            <apply path="j_spring_security_check" rule="ATLAS/atlas/outbound/extrapath"/>
+            <apply path="index.html" rule="ATLAS/atlas/outbound/index"/>
+        </content>
+        <content type="*/html">
+        </content>
+    </filter>
+
+    <filter name="ATLAS/atlas/outbound/headers">
+        <content type="application/x-http-headers">
+            <apply path="Location" rule="ATLAS/atlas/outbound/login/headers/location"/>
+        </content>
+    </filter>
+
+</rules>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/bd4330cf/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/service.xml
b/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/service.xml
new file mode 100644
index 0000000..ec1376c
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/atlas/0.8.0/service.xml
@@ -0,0 +1,51 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<service role="ATLAS" name="atlas" version="0.8.0">
+
+    <policies>
+        <policy role="webappsec"/>
+        <policy role="authentication" name="Anonymous"/>
+        <policy role="rewrite"/>
+        <policy role="authorization"/>
+    </policies>
+
+    <routes>
+
+        <route path="/atlas">
+            <rewrite apply="ATLAS/atlas/inbound/root" to="request.url"/>
+            <rewrite apply="ATLAS/atlas/outbound/links" to="response.body"/>
+            <rewrite apply="ATLAS/atlas/outbound/headers" to="response.headers"/>
+        </route>
+
+        <route path="/atlas/**">
+            <rewrite apply="ATLAS/atlas/inbound/path" to="request.url"/>
+            <rewrite apply="ATLAS/atlas/outbound/links" to="response.body"/>
+            <rewrite apply="ATLAS/atlas/outbound/headers" to="response.headers"/>
+        </route>
+
+        <route path="/atlas/**?**">
+            <rewrite apply="ATLAS/atlas/inbound/query" to="request.url"/>
+            <rewrite apply="ATLAS/atlas/outbound/links" to="response.body"/>
+            <rewrite apply="ATLAS/atlas/outbound/headers" to="response.headers"/>
+        </route>
+
+    </routes>
+
+    <dispatch classname="org.apache.hadoop.gateway.dispatch.PassAllHeadersDispatch"/>
+
+</service>
\ No newline at end of file


Mime
View raw message