@Override public Map<String, String> getParams() { return super.getParams(); }
@Override public Map<String, String> getParams() { return super.getParams(); }
@Override public void contributeFilter( DeploymentContext context, Provider provider, Service service, ResourceDescriptor resource, List<FilterParamDescriptor> params ) { FilterDescriptor filter = resource.addFilter().name( getName() ).role( getRole() ).impl( GatewayDispatchFilter.class ); filter.param().name(DISPATCH_IMPL_PARAM).value(DefaultDispatch.class.getName()); for ( Map.Entry<String,String> serviceParam : service.getParams().entrySet() ) { filter.param().name( serviceParam.getKey() ).value( serviceParam.getValue() ); } if( context.getGatewayConfig().isHadoopKerberosSecured() ) { filter.param().name("kerberos").value("true"); } }
@Override public void contributeFilter( DeploymentContext context, Provider provider, Service service, ResourceDescriptor resource, List<FilterParamDescriptor> params ) { FilterDescriptor filter = resource.addFilter().name( getName() ).role( getRole() ).impl( GatewayDispatchFilter.class ); filter.param().name(DISPATCH_IMPL_PARAM).value(DefaultDispatch.class.getName()); for ( Map.Entry<String,String> serviceParam : service.getParams().entrySet() ) { filter.param().name( serviceParam.getKey() ).value( serviceParam.getValue() ); } if( context.getGatewayConfig().isHadoopKerberosSecured() ) { filter.param().name("kerberos").value("true"); } }
for (Service s : topology.getServices()) { if (s.getRole().equals(role)) { serviceLevelParams = s.getParams(); break;
for (Service s : topology.getServices()) { if (s.getRole().equals(role)) { serviceLevelParams = s.getParams(); break;
public void contributeService( DeploymentContext context, Service service ) throws Exception { String packages = StringUtils.join( getPackages(), ";" ); for( String pattern : getPatterns() ) { ResourceDescriptor resource = context.getGatewayDescriptor().addResource(); resource.role( service.getRole() ); resource.pattern( pattern ); addWebAppSecFilters( context, service, resource ); addXForwardedFilter( context, service, resource ); addAuthenticationFilter( context, service, resource ); addIdentityAssertionFilter( context, service, resource ); addAuthorizationFilter( context, service, resource ); // addRewriteFilter( context, service, resource, null ); List<FilterParamDescriptor> params = new ArrayList<>(); FilterParamDescriptor param = resource.createFilterParam(); param.name( PACKAGES_PARAM ); param.value( packages ); params.add( param ); // FilterParamDescriptor trace = resource.createFilterParam(); // param.name( TRACE_LOGGING_PARAM ); // param.value( "ALL" ); // params.add( trace ); for ( Map.Entry<String,String> serviceParam : service.getParams().entrySet() ) { context.getWebAppDescriptor().createContextParam().paramName(serviceParam.getKey()).paramValue(serviceParam.getValue()); } context.contributeFilter( service, resource, "pivot", "jersey", params ); } } }
@Override public void contributeService(DeploymentContext context, Service service ) throws Exception { String packages = StringUtils.join( getPackages(), ";" ); for( String pattern : getPatterns() ) { ResourceDescriptor resource = context.getGatewayDescriptor().addResource(); resource.role( service.getRole() ); resource.pattern( pattern ); addWebAppSecFilters( context, service, resource ); addXForwardedFilter( context, service, resource ); addAuthenticationFilter( context, service, resource ); addIdentityAssertionFilter( context, service, resource ); addAuthorizationFilter( context, service, resource ); // addRewriteFilter( context, service, resource, null ); List<FilterParamDescriptor> params = new ArrayList<>(); FilterParamDescriptor param = resource.createFilterParam(); param.name( PACKAGES_PARAM ); param.value( packages ); params.add( param ); // FilterParamDescriptor trace = resource.createFilterParam(); // param.name( TRACE_LOGGING_PARAM ); // param.value( "ALL" ); // params.add( trace ); for ( Map.Entry<String,String> serviceParam : service.getParams().entrySet() ) { context.getWebAppDescriptor().createContextParam().paramName(serviceParam.getKey()).paramValue(serviceParam.getValue()); } context.contributeFilter( service, resource, "pivot", "jersey", params ); } } }
private FilterDescriptor addDispatchFilterForClass(DeploymentContext context, Service service, ResourceDescriptor resource, String dispatchClass, String httpClientFactory, boolean useTwoWaySsl, Map<String, String> dispatchParams) { FilterDescriptor filter = resource.addFilter().name(getName()).role(DISPATCH_ROLE).impl(GatewayDispatchFilter.class); filter.param().name(DISPATCH_IMPL_PARAM).value(dispatchClass); if (httpClientFactory != null) { filter.param().name(HTTP_CLIENT_FACTORY_PARAM).value(httpClientFactory); } if(dispatchParams != null) { for ( Map.Entry<String, String> dispatchParam : dispatchParams.entrySet() ) { filter.param().name(dispatchParam.getKey()).value(dispatchParam.getValue()); } } // let's take the value of useTwoWaySsl which is derived from the service definition // then allow it to be overridden by service params from the topology filter.param().name("useTwoWaySsl").value(Boolean.toString(useTwoWaySsl)); for ( Map.Entry<String, String> serviceParam : service.getParams().entrySet() ) { filter.param().name(serviceParam.getKey()).value(serviceParam.getValue()); } if ( context.getGatewayConfig().isHadoopKerberosSecured() ) { filter.param().name("kerberos").value("true"); } else { //TODO: [sumit] Get rid of special case. Add config/param capabilities to service definitions? //special case for hive filter.param().name("basicAuthPreemptive").value("true"); } return filter; }
private FilterDescriptor addDispatchFilterForClass(DeploymentContext context, Service service, ResourceDescriptor resource, String dispatchClass, String httpClientFactory, boolean useTwoWaySsl) { FilterDescriptor filter = resource.addFilter().name(getName()).role(DISPATCH_ROLE).impl(GatewayDispatchFilter.class); filter.param().name(DISPATCH_IMPL_PARAM).value(dispatchClass); if (httpClientFactory != null) { filter.param().name(HTTP_CLIENT_FACTORY_PARAM).value(httpClientFactory); } // let's take the value of useTwoWaySsl which is derived from the service definition // then allow it to be overridden by service params from the topology filter.param().name("useTwoWaySsl").value(Boolean.toString(useTwoWaySsl)); for ( Map.Entry<String, String> serviceParam : service.getParams().entrySet() ) { filter.param().name(serviceParam.getKey()).value(serviceParam.getValue()); } if ( context.getGatewayConfig().isHadoopKerberosSecured() ) { filter.param().name("kerberos").value("true"); } else { //TODO: [sumit] Get rid of special case. Add config/param capabilities to service definitions? //special case for hive filter.param().name("basicAuthPreemptive").value("true"); } return filter; }