Filtering headers in requests for HAT configuration in IAG

Applies To: Intelligent Application Gateway (IAG)

When configuring host address translation (HAT) in Whale Communications Intelligent Application Gateway (IAG) 2007, you can configure HAT settings in the Application Access Portal configuration file to filter headers in requests, so that the defined headers are sent only to the configured applications or application types. Header filtering is defined in the element <HEADER_FILTER>, described below.

For more information about HAT, see About host address translation (HAT) in IAG portals.

<HEADER_FILTER>

Description

Defines which headers are filtered and the applications to which each header is sent.

Usage

Only one <HEADER_FILTER> element can reside in the AAP configuration file.

Attributes & Attribute Values

None.

Child Elements

<HEADER_FILTER> must contain only one <INCOMING> element, described below.

[<HEADER_FILTER>] > [<INCOMING>]

<INCOMING>

Description

Child element of <HEADER_FILTER>. Determines the filtering of request headers.

Usage

Only one <INCOMING> element must be nested under <HEADER_FILTER>.

Attributes & Attribute Values

None.

Child Elements

<INCOMING> can contain an unlimited number of <HEADER> elements, described below.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>]

Description

Child element of <INCOMING>. Defines the header that is filtered and the applications to which the header is sent.

Usage

  • At least one <HEADER> element must be nested under <INCOMING>.

  • An unlimited number of <HEADER> elements can be nested under <INCOMING>.

Attributes & Attribute Values

None.

Child Elements

<HEADER> must contain the following:

  • One <NAME> element.

  • One or more <APPLICATION> elements.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<NAME>]

<NAME>

Description

Child element of <HEADER>. Defines the header to be filtered.

Usage

  • One <NAME> element must be nested under <HEADER>.

  • Not case sensitive.

Attributes & Attribute Values

None.

Child Elements

None.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>]

<APPLICATION>

Description

Child element of <HEADER>. Defines one or more applications or application types to which the header defined in <NAME>, above, is sent.

Usage

  • At least one <APPLICATION> element must be nested under <HEADER>.

  • An unlimited number of <APPLICATION> elements can be nested under <HEADER>.

Attributes & Attribute Values

None.

Child Elements

<APPLICATION> must contain at least one of the following:

  • <SERVER_NAME> element.

  • <APPLICATION_TYPE> element.

It can contain a combination of both <SERVER_NAME> and <APPLICATION_TYPE> elements.

<APPLICATION> can also contain any of the following optional elements:

  • For each <SERVER_NAME> element, a <PORT> element.

  • <VALUE>

  • <URL>

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>] > [<SERVER_NAME>]

<SERVER_NAME>

Description

Child element of <APPLICATION>. Defines a server or a subnet to which the header is sent.

Usage

  • Only one <SERVER_NAME> element must be nested under <APPLICATION>.

  • Can be defined using one of the following methods:

    • Server name or a range of names, using regular expressions.

    • Subnet, using the mask attribute. For example:

      For subnet class A:

      <SERVER_NAME mask="255.0.0.0">63.0.0.0</SERVER_NAME>

      For subnet class B:

      <SERVER_NAME mask="255.255.0.0">160.12.0.0</SERVER_NAME>

      For subnet class C:

      <SERVER_NAME mask="255.255.255.0">192.168.1.0</SERVER_NAME>

      Note

      In this syntax, enter the actual IP address, not regular expressions.

Tip

For examples of the use of both methods in a <SERVER_NAME> element, refer to Sample Code: <HEADER_FILTER>.

Attributes & Attribute Values

Attribute Values Type or comments

mask

subnet mask

Optional. Used to define a subnet mask.

Child Elements

None.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>] > [<PORT>]

<PORT>

Description

Child element of <APPLICATION>; applicable only if a <SERVER_NAME> element is used. Specifies the port number to which the header is sent.

For example: to define that, on the server defined in <SERVER_NAME>, the header will only be sent to port 80, add the following element:

<PORT>80</PORT>

Usage

  • Optional.

  • Only one <PORT> element can be nested under <APPLICATION>.

Attributes & Attribute Values

None.

Child Elements

None.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>] > [<APPLICATION_TYPE>]

<APPLICATION_TYPE>

Description

Child element of <APPLICATION>. Defines the type of application to which the header is sent. For instructions on where you can find the name of the application type, as it should be entered here, see the section "Finding an application type" in About the Editor console.

Usage

Only one <APPLICATION_TYPE> element must be nested under each <APPLICATION> element.

Attributes & Attribute Values

None.

Child Elements

None.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>] > [<VALUE>]

<VALUE>

Description

Child element of <APPLICATION>. Only if the value defined here is found in the header, the header is sent to the application.

Usage

  • Optional.

  • Only one <VALUE> element can be nested under <APPLICATION>.

  • Takes regular expressions.

Attributes & Attribute Values

None.

Child Elements

None.

[<HEADER_FILTER>] > [<INCOMING>] > [<HEADER>] > [<APPLICATION>] > [<URL>]

<URL>

Description

Child element of <APPLICATION>. Defines the URL directory that specifies the application.

For example: to define that, on the server defined in <SERVER_NAME>, the header will only be sent to URLs beginning with header_URLs, add the following element:

<URL>/header_URLs/.*</URL>

Usage

  • Optional.

  • Only one <URL> element can be nested under <APPLICATION>.

  • Takes regular expressions.

Attributes & Attribute Values

None.

Child Elements

None.

Sample Code: <HEADER_FILTER>

// In this example, the header “xxx” is sent only to the following

// applications:

// Application 1:

// Server: www.x.com

// URL: /x/y/

// Application 2:

// Server: www.y.com

// Port: 6001

// URL: /z/y/

// Whereas the header “yyy”, with the value “zzz”, is sent only to

// the servers in the following subnet:

// IP 201.201.1.5

// Mask 255.255.0.0

// URL directory /x/y

<HEADER_FILTER>

<INCOMING>

<HEADER>

<NAME>xxx</NAME>

<APPLICATION>

<SERVER_NAME>www\.x\.com</SERVER_NAME>

<URL>/x/y/.*</URL>

</APPLICATION>

<APPLICATION>

<SERVER_NAME>www\.y\.com</SERVER_NAME>

<PORT>6001</PORT>

<URL>/z/y/.*</URL>

</APPLICATION>

</HEADER>

<HEADER>

<NAME>yyy</NAME>

<APPLICATION>

<VALUE>zzz</VALUE>

<SERVER_NAME mask="255.255.255.0">192.168.1.0</SERVER_NAME>

<URL>/x/y/.*</URL>

</APPLICATION>

</HEADER>

</INCOMING>

</HEADER_FILTER>