UrlRewriteRulesDescriptor clusterRules = context.getDescriptor( "rewrite" );
clusterRules.addRules( oozieRules );
}
public void contributeResources( DeploymentContext context, Service service ) throws URISyntaxException {
ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
rootResource.role( service.getRole() );
rootResource.pattern( EXTERNAL_PATH + "/**?**" );
addAuthenticationFilter( context, service, rootResource );
addRewriteFilter( context, service, rootResource );
addIdentityAssertionFilter( context, service, rootResource );
addAuthorizationFilter(context, service, rootResource);
addDispatchFilter( context, service, rootResource );
ResourceDescriptor v1Resource = context.getGatewayDescriptor().addResource();
v1Resource.role( service.getRole() );
v1Resource.pattern( EXTERNAL_PATH + "/v1/**?**" );
addAuthenticationFilter( context, service, v1Resource );
addRewriteFilter( context, service, v1Resource );
addIdentityAssertionFilter( context, service, v1Resource );
addAuthorizationFilter(context, service, v1Resource);
addDispatchFilter( context, service, v1Resource );
ResourceDescriptor v2Resource = context.getGatewayDescriptor().addResource();
v2Resource.role( service.getRole() );
v2Resource.pattern( EXTERNAL_PATH + "/v2/**?**" );
addAuthenticationFilter( context, service, v2Resource );
addRewriteFilter( context, service, v2Resource );
addIdentityAssertionFilter( context, service, v2Resource );
addAuthorizationFilter(context, service, v2Resource);
addDispatchFilter( context, service, v2Resource );