Skip navigation.

Extension SDK for BEA WebLogic Network Gatekeeper

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Creating an example Policy Utility

The following section provides a description on how to create an example PolicyUtility:

The example uses the data provided by the PEP, a rule will extract the relevant data and call the Policy utility. The Policy utility uses a Subscriber Profile plug-in to do a look-up in the database if a subscriber with a certain address is registered in the database. If defined, the Policy utility will allow the requests, otherwise deny it. The Policy utility has the following properties:

 


General preparations

This is general preparations. Do not perform these two steps if they already have been performed when creating the network plug-in as described in Creating an example network plug-in.

  1. Make sure the files for the Policy utility are copied to the directory exampleproj. That is, all files and directories in \module_templates\policy_util_impl
  2. Change directory to bea\wlng21\esdk\build and issue the command ant

 


Preparing the Policy utility

Set up the build environment

  1. Edit the file exampleproj\policy_util_impl\build.xml.

Edit the properties described in Adapting the build files for the modules on page 15-40 to reflect the desired names.

Defining the OAM methods

  1. Edit the files exampleproj\policy_util_impl\idl\MyPolicyUtilOAM.idl. Define any additional OAM methods.

Policy utility implementation and rule files

The Policy utility implementation is a singleton class, that provides the public methodsubscriberExists. This method is called from the rule.

  1. Adapt the template Policy utility singleton class MyPolicyUtility.java in exampleproj\policy_util_impl\src\com\acompany\policy\util to suit the specific needs. The template implementation uses a subscriber profile plug-in t check if a subscription exists, thus giving an example on how to interact with a subscriber profile plug-in and the plug-in manager.
  2. Adapt the import statement for Policy Utility class in the rule file if there have been any changes.
  3. Adapt the name of the class that is called in the rule file if there has been any changes.
  4. Adapt the method names if there have been any changes or additions.

 


Installing the Policy Utility

This section describes how to install and deploy the Policy Utility that was created using the instructions in this section. For instructions on how to use the Management Tool in more detail, see WebLogic Network Gatekeeper User's Guide.

  1. Make sure you have access (by ftp directly to the file system) to the SLEE in that the Policy utility shall be installed in.
  2. Open the Management Tool and select the SLEE in which to install the Policy Utility.
  3. In the SLEE_deployment service, select install. Enter the URL to the jar-file in the field ServiceJarURL and click Invoke.
  4. In the example, the path and file name is file:///<drive>/exampleproj/policy_util_impl/lib and the name was defined in the build file property local.jarName.

    Note: On Windows systems, use three (3) slashes prior to the disk name.

  5. In the SLEE_deployment service, select start. Enter the SLEE name for the Policy Utility. Click Invoke.
  6. The name was defined in the build file property local.deployName.

  7. In the SLEE_deployment service, select activate. Enter the SLEE name for the Policy Utility. Click Invoke.

Note: If a Policy utility class has been changed and needs to be reinstalled, uninstall the Policy Utility using the methods deactivate, stop, and uninstall in the SLEE_deployment service via the Management Tool. Then, install the new Policy Utility using the procedure described above and restart the SLEE.

 


Install policy rules

In order to load the rules that calls the Policy utility, follow the instructions in Install policy rules.

 


Install Subscriber profile plug-in

The rule uses the subscriber profile plug-in provided in bea\wlng21\esdk\lib\b_db_sp_resource.jar.

Install this plug-in according to the schema described in Installing the Policy Utility. The Plug-in has the SLEE name Plugin_subscriber_profile_DB.

 


Provision data to the database

Via the Management Tool, use the OAM methods createSubscriber and deleteSubscriber in the SLEE service Plugin_subscriber_profile_DB to add and delete users from the database. The Policy utility checks if the user exists in this database.

 

Skip navigation bar  Back to Top Previous Next