Hi all
I want to add our own service to Knox 0.6.0 in HDP2.3 . This service can be deployed to HDP2.3 through Ambari2.x. It is a server has a LDAP or DB as user store and authentication.
How can I make this service REST API and its UI to be proxyed by Knox0.6.0 in a declarative way? I do not want to write any java code to build it as jar into lib of Knox .Anyone can help this?
my service is like below:
1. knox/conf/topologies/myservice.xml
<?xml version=”1.0″ ?>
<topology>
<gateway>
<provider>
…
</provider>
</gateway>
<service>
<role>MYSERVICE</role>
<url>http://myservicehost:9090</url>
</service>
</topology>
2. knox/data/services/myservice/1.0/service.xml
<service role=”MYSERVICE” name=”myservice” version=”1.0″>
<routes>
<route path=”/ods/”>
</route>
<route path=”/ods/**”>
</route>
</routes>
</service>
3. knox/data/services/myservice/1.0/rewrite.xml
<rules>
<!– Inbound rewrite rules –>
<rule dir=”IN” name=”MYSERVICE/inbound/root” pattern=”*://*:*/**/ods/”>
<rewrite template=”{$serviceUrl[MYSERVICE]}/ods/”/>
</rule>
</rules>
access internal service by http://myservicehost:9090/ods is ok, but access my knox service by https://gatewayhost:port/gateway/myservice/ods is empty. The log say “hadoop.gateway (GatewayFilter.java:doFilter(152)) – Failed to match path /ods” .
How to resolve this?
What is the detailed procedure for adding our own service hosted on cluster nodes to knox?