Package org.apache.hadoop.gateway.descriptor

Examples of org.apache.hadoop.gateway.descriptor.ResourceDescriptor.pattern()


  public void contributeDataNodeResource( DeploymentContext context, Service service ) throws URISyntaxException {
    List<FilterParamDescriptor> params;
    ResourceDescriptor fileResource = context.getGatewayDescriptor().addResource();
    fileResource.role( service.getRole() );
    fileResource.pattern( DATANODE_EXTERNAL_PATH + "/**?**" );
    addWebAppSecFilters(context, service, fileResource);
    addAuthenticationFilter( context, service, fileResource );
    addIdentityAssertionFilter( context, service, fileResource );
    addAuthorizationFilter( context, service, fileResource );
    params = new ArrayList<FilterParamDescriptor>();
View Full Code Here


    List<ResourceDescriptor> resources = context.getGatewayDescriptor().resources();
    assertThat( resources.size(), is( 2 ) );

    resource = resources.get( 0 );
    assertThat( resource.role(), is( "test-service-role" ) );
    assertThat( resource.pattern(), is( "test-service/?**" ) );
    List<FilterDescriptor> filters = resource.filters();
    assertThat( filters.size(), is( 1 ) );
    FilterDescriptor filter = filters.get( 0 );
    assertThat( filter.role(), is( "pivot") );
    assertThat( filter.name(), is( "jersey" ) );
View Full Code Here

    assertThat( param.name(), is( "jersey.config.server.provider.packages" ) );
    assertThat( param.value(), is( "test-package-1;test-package-2"  ) );

    resource = resources.get( 1 );
    assertThat( resource.role(), is( "test-service-role" ) );
    assertThat( resource.pattern(), is( "test-service/**?**" ) );
    filters = resource.filters();
    assertThat( filters.size(), is( 1 ) );
    filter = filters.get( 0 );
    assertThat( filter.role(), is( "pivot") );
    assertThat( filter.name(), is( "jersey" ) );
View Full Code Here

  @Override
  public void contributeService( DeploymentContext context, Service service ) throws Exception {
    ResourceDescriptor resource = context.getGatewayDescriptor().addResource();
    resource.role( service.getRole() );
    resource.pattern( "test-service-path/**?**" );
    addAuthenticationFilter( context, service, resource );
    addIdentityAssertionFilter( context, service, resource );
    addAuthorizationFilter( context, service, resource );
    //addRewriteFilter( context, service, resource, null ); // This shouldn't be included for in-processes services.
    context.contributeFilter( service, resource, "test-provider-role", "test-provider-name", null );
View Full Code Here

  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 );
      addAuthenticationFilter( context, service, resource );
      addIdentityAssertionFilter( context, service, resource );
      addAuthorizationFilter( context, service, resource );
      // addRewriteFilter( context, service, resource, null );
      List<FilterParamDescriptor> params = new ArrayList<FilterParamDescriptor>();
View Full Code Here

  }

  public void contributeResources( DeploymentContext context, Service service ) throws URISyntaxException {
    ResourceDescriptor rootResource = context.getGatewayDescriptor().addResource();
    rootResource.role( service.getRole() );
    rootResource.pattern( EXTERNAL_PATH + "/**?**" );
    addWebAppSecFilters(context, service, rootResource);
    addAuthenticationFilter( context, service, rootResource );
    addRewriteFilter( context, service, rootResource );
    addIdentityAssertionFilter( context, service, rootResource );
    addAuthorizationFilter(context, service, rootResource);
View Full Code Here

    addAuthorizationFilter(context, service, rootResource);
    addDispatchFilter( context, service, rootResource );

    ResourceDescriptor v1Resource = context.getGatewayDescriptor().addResource();
    v1Resource.role( service.getRole() );
    v1Resource.pattern( EXTERNAL_PATH + "/v1/**?**" );
    addWebAppSecFilters(context, service, v1Resource);
    addAuthenticationFilter( context, service, v1Resource );
    addRewriteFilter( context, service, v1Resource );
    addIdentityAssertionFilter( context, service, v1Resource );
    addAuthorizationFilter(context, service, v1Resource);
View Full Code Here

    addAuthorizationFilter(context, service, v1Resource);
    addDispatchFilter( context, service, v1Resource );

    ResourceDescriptor v2Resource = context.getGatewayDescriptor().addResource();
    v2Resource.role( service.getRole() );
    v2Resource.pattern( EXTERNAL_PATH + "/v2/**?**" );
    addWebAppSecFilters(context, service, v2Resource);
    addAuthenticationFilter( context, service, v2Resource );
    addRewriteFilter( context, service, v2Resource );
    addIdentityAssertionFilter( context, service, v2Resource );
    addAuthorizationFilter(context, service, v2Resource);
View Full Code Here

  @Override
  public void contributeService( DeploymentContext context, Service service ) throws URISyntaxException {
    ResourceDescriptor resource = context.getGatewayDescriptor().addResource();
    resource.role( service.getRole() );
    resource.pattern( AS_EXTERNAL_PATH + "/authenticate");
    if (topologyContainsProviderType(context, "authentication")) {
      context.contributeFilter( service, resource, "authentication", null, null );
    }
    if (topologyContainsProviderType(context, "federation")) {
      context.contributeFilter( service, resource, "federation", null, null );
View Full Code Here

    for( ResourceParamDescriptor param : resource.params() ) {
      paramMap.put( param.name(), param.value() );
    }
    //TODO: Should all elements of the resource and gateway descriptor somehow be added to the filter params?
    //TODO: Should we use some composite params object instead of copying all these name value pairs?
    paramMap.put( "pattern", resource.pattern() );
    List<FilterParamDescriptor> paramList = filter.params();
    for( FilterParamDescriptor param : paramList ) {
      paramMap.put( param.name(), param.value() );
    }
    return paramMap;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.