KNOX-1155 - Knox Gateway Service for ElasticSearch (Dequan Chen via lmccay)
authorLarry McCay <lmccay@apache.org>
Tue, 3 Jul 2018 22:39:54 +0000 (18:39 -0400)
committerLarry McCay <lmccay@apache.org>
Tue, 3 Jul 2018 22:41:22 +0000 (18:41 -0400)
gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/rewrite.xml [new file with mode: 0644]
gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/service.xml [new file with mode: 0644]

diff --git a/gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/rewrite.xml
new file mode 100644 (file)
index 0000000..f99fd27
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   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>
+    <rule dir="IN" name="ELASTICSEARCH/elasticsearch/inbound/root" pattern="*://*:*/**/elasticsearch/">
+        <rewrite template="{$serviceUrl[ELASTICSEARCH]}/"/>
+    </rule>
+    <rule dir="IN" name="ELASTICSEARCH/elasticsearch/inbound/path" pattern="*://*:*/**/elasticsearch/{path=**}?{**}">
+        <rewrite template="{$serviceUrl[ELASTICSEARCH]}/{path=**}?{**}"/>
+    </rule>
+</rules>
diff --git a/gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/service.xml b/gateway-service-definitions/src/main/resources/services/elasticsearch/1.0.0/service.xml
new file mode 100644 (file)
index 0000000..fdf5603
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   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="ELASTICSEARCH" name="elasticsearch" version="1.0.0">
+    <policies>
+        <policy role="webappsec"/>
+        <policy role="authentication" name="Anonymous"/>
+        <policy role="rewrite"/>
+    </policies>
+    <routes>
+        <route path="/elasticsearch"/>
+        <route path="/elasticsearch/**"/>
+    </routes>
+    <dispatch classname="org.apache.hadoop.gateway.dispatch.PassAllHeadersDispatch"/>
+</service>