UIO_log4j.xml

6-20 Oracle Fusion Middleware Developers Guide for Oracle Adaptive Access Manager

6.6.1 Elements of the UIO Proxy Configuration File

The following sections describe various elements of the proxy configuration file.

6.6.1.1 Components of Interceptors

Interceptors are the most important elements in the proxy configuration. Authoring the proxy configuration file deals mostly with defining interceptors. There are two types of interceptors: request interceptors and response interceptors. As the names suggest, request interceptors are used when the proxy receives HTTP requests from the client browser and response interceptors are used when the proxy receives HTTP response from the server, for example, Web application or OAAM Server. There are four components to an interceptor and all of them are optional.

1. List of URLs

- the interceptor will be evaluated if the interceptor URL list contains the current request URL or if the URL list is empty. The URLs must be an exact match; there is no support for regular expressions. For a request interceptor, this is the set of URLs for which the request interceptor will be executed in the request portion of the HTTP request, for example, on the way from the client to the server. For a response interceptor, the URL is that of the HTTP request; the response interceptor will be executed in the response portion of the HTTP request, for example, while getting the response from the server to the client. If the URL has query parameters, then they should not be listed. You can use conditions to check for any query parameters.

2. List of conditions

- conditions can inspect the requestresponse contents, such as checking for the presence of an HTTP headerparametercookie, and so on, or testing whether a headerparametercookie has a specific value or not. Filters and action defined in the interceptor will be executed only if all the conditions specified are met or if no condition is specified.

3. List of filters

- filters perform an action that might modify the requestresponse contents or modify some state information in the proxy. For example, a filter can addremove HTTP headers, save HTTP headerparametercookie value in a proxy variable, and so on.

4. Action

- after executing the filters the interceptor will perform the action, if one is specified. Actions can be one of the following: a. a redirect the client to a different URL b. send a saved response to the client c. perform a HTTP get on server d. perform a HTTP post on server e. send a saved request to the server Oracle Adaptive Access Manager Proxy 6-21

6.6.1.2 Conditions

Conditions are used in the proxy to inspect HTTP requestresponse or the state information saved in the proxy variables. Each condition evaluates to either true or false. Conditions are evaluated in the order they are listed in the configuration file until a condition evaluates to false or all conditions are evaluated. Table 6–14 lists conditions that can be defined in an interceptor. Table 6–13 Components of Interceptors Interceptor Attributes Description RequestInterceptor id, desc, post-exec-action, isGlobal, enabled RequestInterceptor defines an interceptor that will be run during the request phase. It has an id, description. Optionally it has a post-exec-action that takes the values continue, stop-intercept, stop-phase-intercept; the default is continue. Optionally it has isGlobal which takes the values true or false and is false by default. It also takes the enabled attribute which is also optional and is true by default. ResponseInterceptor id, desc, post-exec-action, isGlobal, enabled ResponseInterceptor defines an interceptor that is run during the response phase of the HTTP request. The attributes of this element are similar to that of RequestInterceptor. This element contains zero or more RequestUrl elements, zero or more conditions elements, zero or more filter elements, zero or one target element. The RequestUrl element has a single URL element for which this interceptor will execute. The URl must be an exact match. There is no regular expression or pattern support for the URL. Instead of the RequestUrl element there is a ResponseUrl element which has similar meaning. All else is similar to the RequestInterceptor. Table 6–14 Conditions Defined in an Interceptor Condition name Attributes Description HeaderPresent enabled, name Checks the presence of the specified header in requestresponse. The header name should be terminated by a colon :. Example: HeaderPresent name=userid: ParamPresent enabled, name Checks the presence of the specified parameter in the request. Example: ParamPresent name=loginID QueryParamPresent enabled, name Checks the presence of the specified query parameter in the URL. Example: QueryParamPresent name=TraceID