Skip Headers
Oracle® Communications Services Gatekeeper Patch Release Notes
Release 5.0.0.1

Part Number E24004-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8 Interceptor Chain Customization

This chapter describes how interceptor chains can be customized for a specific communication service. Interceptor rules can be used to define which interceptors are used based on communication service.

For general information on service interceptors, see the Service Interceptors chapter in the Platform Development Studio Developer's Guide.

Overview

The Services Gatekeeper Plugin Manager retrieves a list of all eligible interceptors when an initial service request is received. The Plugin Manager references an internal interceptor rule configuration and removes disabled interceptors for subsequent requests. The customized interceptor chain is then stored in cache so future requests to the same communication service are handed off automatically to the custom interceptor chain.

The interceptor rule configuration is stored in the Services Gatekeeper database and loaded into cache at initial startup. Changes to the configuration will result in a flush of the cached interceptor chains. Subsequent requests then trigger Services Gatekeeper to refresh the cached rule configuration from the database.

Available interceptors in Services Gatekeeper are determined by the config.xml file located in the interceptors.ear file. For information on configuring available interceptors, including custom interceptors, see the Platform Development Studio Developer's Guide.

Managing Custom Interceptor Filter Rules

To create a custom interceptor rule, create an XML file based on the interceptorRule.xsd file located in the $MIDDLEWARE_HOME/ocsg_5.X/modules/com.bea.wlcp.wlng.plugin.mngr_5.0.0.1.jar. The Plugin Manager MBean is used to create, edit and delete interceptor rule configuration.

The MBean can be accessed from a variety of interfaces including the WebLogic Administration Console, the Platform Test Environment (PTE) or by using the WebLogic Scripting Tool (WLST).

For information on using the WebLogic Administration Console and WSLT, see the Operation and Maintenance chapter in System Administrator's Guide.

For information on using the PTE with the Plugin Manager Mbean, see the discussion on Configuring Communication Services by Changing MBean Attributes and Operations in Platform Test Environment Guide.

Interceptor Rule Parameters

The default interceptor configuration is provided in the interceptorRule.xml file located in the com.bea.wlcp.wlng.plugin.mngr_5.0.0.1.jar. When a new Services Gatekeeper domain is created this configuration is used. Interceptors not included in the configuration file are enabled by default.

Use the Mbean operations available in the Administrator Console to edit the configuration. See "Summary of Tasks Related to Interceptors" for more information.

Interceptor rules contain the elements listed in Table 8-1.

Table 8-1 Interceptor Rule Elements

Name Type Description

packageName

string

The plug-in for the communication service for which the rule is to be valid for. Regular expressions can be used in the package name to specify more than one package.

methodName

string

The method for which the rule is to be valid for. Regular expressions can be used in the method name to specify more than one method.

interceptorPoint

tns:InterceptorPoint

The topological system location in Services Gatekeeper where the interceptor chain is applied (MT_NORTH, MT_SOUTH, MO_NORTH or MO_SOUTH.

interceptorName

string

The interceptor for which the rule applies. Multiple interceptors can be included if each is enclosed in the <interceptorName> tag.

enable

boolean

Boolean indicating if the interceptor(s) listed should be enabled or disabled in the rule.


Example 8-1 contains an interceptor rule configuration file that performs the following:

  • Applies the rule configuration to all parlayrest plug-ins by using a wildcard:

    • packageName is set to ..*$

  • Enables the standard Services Gatekeeper interceptors for the MT_NORTH interceptor for all parlayrest plug-ins:

    • interceptorPoint is set to MT_NORTH

    • interceptorName lists the standard interceptors included in the rule

    • enable is set to true allowing all the listed interceptors to run

  • Disables the MT_NORTH OAuth 2.0 interceptor using a second rule

Example 8-1 Sample interceptorRule.xml Configuration File

<?xml version="1.0" encoding="UTF-8"?>
<tns:interceptorConfig xmlns:tns="http://ocsg.oracle/plugin/xsd/interceptorRule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ocsg.oracle/plugin/xsd/interceptorRule interceptorRule.xsd ">
  <!-- following are retrieved from ServiceType.java
        oracle.ocsg.parlayrest.plugin.MmsPlugin
        oracle.ocsg.parlayrest.callback.MessageNotificationCallback
        oracle.ocsg.parlayrest.plugin.PaymentPlugin
        oracle.ocsg.parlayrest.plugin.ParlayRestSmsPlugin
        oracle.ocsg.parlayrest.callback.ClientSmsNotificationCallback
        oracle.ocsg.parlayrest.plugin.TerminalLocationPlugin 
  -->
  <tns:interceptorRule>
    <tns:packageName>^oracle\.ocsg\.parlayrest\.plugin\..*$</tns:packageName>
    <tns:methodName>^.*$</tns:methodName>
    <tns:interceptorPoint>MT_NORTH</tns:interceptorPoint>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceApplicationState</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceSpAppBudget</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceComposedBudget</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.FindAndValidateSLAContract</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.CheckMethodParametersFromSLA</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceBlacklistedMethodFromSLA</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.InjectValuesInRequestContextFromSLA</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceNodeBudget</tns:interceptorName>
    <tns:interceptorName>com.bea.wlcp.wlng.interceptor.EnforceSubscriberBudget</tns:interceptorName>
    <tns:enable>true</tns:enable>
  </tns:interceptorRule>

  <tns:interceptorRule>

  <!-- Enable/disable OAuth2 interceptor -->
  <tns:interceptorRule>
    <tns:packageName>^.*$</tns:packageName>
    <tns:methodName>^.*$</tns:methodName>
    <tns:interceptorPoint>MT_NORTH</tns:interceptorPoint>
    <tns:interceptorName>oracle.ocsg.oauth2.interceptor.OAuth2Interceptor</tns:interceptorName>
    <tns:enable>false</tns:enable>
  </tns:interceptorRule>
</tns:interceptorConfig>

Summary of Tasks Related to Interceptors

The following is a summary of tasks related to Interceptor Rules.

Interceptor Rules

Table 8-2 lists the tasks related to application accounts and the operations you use to perform those tasks.

Table 8-2 Tasks Related to Application Accounts

Task Operation to Use

List the enabled interceptors loaded in Services Gatekeeper

listInterceptors

Retrieve the current interceptor rule configuration file

retrieveInterceptorConfiguration

Update the interceptor rule configuration file

updateInterceptorConfiguration



Reference: Attributes and Operations for Interceptor Rules

Managed object: Container Services > PluginManager

MBean: com.bea.wlcp.wlng.plugin.PluginManagerMBean

Following is a list of operations for configuration and maintenance.


listInterceptors

The listInterceptors operation retrieves a list of all enabled interceptors in Services Gatekeeper.

Scope

Domain

Signature

listInterceptors(InterceptionPoint: String)

Parameters

InterceptionPoint

The Services Gatekeeper interface where the interceptor(s) are applied (MT_NORTH, MT_SOUTH, MO_NORTH or MO_SOUTH).


retrieveInterceptorConfiguration

The retrieveIneterceptorConfiguraiton operation retrieves the active interceptor rule configuration in Services Gatekeeper.

Scope

Domain

Signature

retrieveInterceptorConfiguration()

updateInterceptorConfiguration

The updateInterceptorConfiguration operation updates the Services Gatekeeper interceptor rule configuration.

Scope

Domain

Signature

updateInterceptorConfiguration(Sla : String)

Parameters

Sla

The contents on an interceptorRule.xml file. See Example 8-1