This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • KNOX-103: Support multiple <pattern> children in <resource> for gateway.xml

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

The examples below show how allowing multiple patterns per resource could simplify both service contributor development and significantly reduce the size of a generated gateway.xml.

Code Block
languagejava
titleSimplified Resource Contribution
linenumberstrue
ResourceDescriptor fileResource = context.getGatewayDescriptor().addResource();
fileResource.role( service.getRole() );
fileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/?**" );
fileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/**?**" );
Code Block
languagexml
titleSimplified Gateway Descriptor
linenumberstrue
<gateway>
  <resource>
    <role>WEBHDFS</role>
    <pattern>/webhdfs/v1/?**</pattern>
    <pattern>/webhdfs/v1/**?**</pattern>
    <filter>
      ...
    </filter>
    ...
  </resource>
</gateway>