Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This design is intended to address the following issues:

KNOX-179@jira: Simple way to introduce new servlet filters into the chains
KNOX-103@jira: Support multiple <pattern> children in <resource> for gateway.xml
KNOX-177@jira: Simplify service deployment contributor implementation

Each of these issues stem This issue stems from what is currently expected of a ServiceDeploymentContributor in its contributeService method.
Basically each service deployment contributor is expected to build its own filter chain.
This is currently done by making calls to Deploymentcontext.contributeFilter.
While this provides a great deal of flexibility for each service to define a custom chain we have found that this isn't commonly necessary.
Furthermore it makes if very difficult if not impossible to introduce new filters in a chain without impacting all services.
This design will provide an abstraction to the service deployment contributors that can create either a default or specifically configured chain of filters.
The goal is to support a pattern in service deployment contributors that looks like this:

...

Code Block
xml
xml
titleSample Topology Descriptor
linenumberstrue
<topology>

  <gateway>

    <provider>
      <role>...</role>
      <name>...</name>
      <!-- Config for the <config>...</config>provider. -->
      <param><name>...</name><value>...</value></param>
    </provider>

    <!-- NOTE: There will be a "built-in" "default" chain definition. -->  
    <chain>
      <name>...</name>
      <provider-ref>
        <role>...</role>
        <name>...</name>
        <!-- Config for the provider to override those in the provider. -->
        <param><name>...</name><value>...</value></param>
      </provider-ref>
      <provider-ref>...</provider-ref>
    </chain>
    <chain>...</chain>

  </gateway>

  <service>
    <role>...</role>
    <url>...</url>
    <chain-ref>
  <config>    <name>...</config>
    <chain-ref>name>
      <!-- Config for the provider to override those in the chain. -->
      <name>...</name><param><role></role><name></name><value></value></param>
    </chain-ref>
    <!-- Config for the service. -->
    <param><role></role><name><<param><name></name><value></value></param>
  </service>

</topology>

...