bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Developing Security Providers for WebLogic Server

 Previous Next Contents Index View as PDF  

Writing Console Extensions for Custom Security Providers

Console extensions allow you to provide functionality that is not included in the standard WebLogic Server Administration Console, or provide an alternate interface for existing functionality. You provide this functionality by adding nodes to the navigation tree, and/or by adding or replacing tabbed dialogs and dialog screens.

Note: Detailed information about how to write console extensions is provided in Extending the Administration Console, and should be reviewed before proceeding.

The following sections provide information about writing console extensions specifically for use with custom security providers:

 


When Should I Write a Console Extension?

To get complete configuration and management support through the WebLogic Server Administration Console for a custom security provider, you need to write a console extension when:

Some other (optional) reasons for extending the Administration Console include:

 


When In the Development Process Should I Write a Console Extension?

The various programmatic elements that comprise a console extension are packaged into a Web application and deployed in your WebLogic Server domain. The point in the development process when you develop the Web application is completely up to you.

However, before you or an administrator can use the console extension to configure and manage a custom security provider, the MBean type for the custom security provider must have been generated (as described in Generating an MBean Type to Configure and Manage the Custom Security Provider) and the console extension Web application properly packaged and deployed.

Note: For instructions about how to develop, package, and deploy a console extension as a Web application, see Main Steps for Writing an Administration Console Extension.

 


How Writing a Console Extension for a Custom Security Provider Differs From a Basic Console Extension

While basic console extensions (described in Extending the Administration Console) provide a great deal of flexibility and capability, the additional mechanisms that are available for writing security provider-specific console extensions enable:

 


Main Steps for Writing an Administration Console Extension

Although security provider-specific console extensions provide the additional features described in How Writing a Console Extension for a Custom Security Provider Differs From a Basic Console Extension, the main process for writing console extensions is the same:

  1. Create a Java class that defines your Administration Console extension. This class defines where your console extension appears in the navigation tree and can provide additional functionality required by your extension. For more information, see "Implementing the NavTreeExtension Interface" in Extending the Administration Console.
  2. Define the behavior of the Navigation tree. In this step you can define multiple nodes that appear under the node you define in step 1. You can also define right-click menus and actions. For more information, see "Setting Up the Navigation Tree" in Extending the Administration Console.
  3. Write JavaServer Pages (JSPs) to display your console extension screens. You may use localized text by looking up strings in a localization catalog. A supplied tag library allows you to create tabbed dialog screens similar to those in the standard Administration Console and to access the localization catalogs. For more information, see "Writing the Console Screen JSPs" in Extending the Administration Console.
  4. Package your JSPs, catalogs, and Java classes as a Web application. For more information, see "Packaging the Administration Console Extension" in Extending the Administration Console.
  5. Deploy the Web application containing your console extension on the Administration Server in your WebLogic Server domain. For more information, see "Deploying an Administration Console Extension" in Extending the Administration Console.

 


Replacing Custom Security Provider-Related Administration Console Dialog Screens Using the SecurityExtension Interface

The SecurityExtension interface provides methods that allow you to replace various custom security provider-related Administration Console dialog screens. The Java class you create to define your console extension can implement the SecurityExtension interface in addition to (or in place of) extending the Extension class. (The Extension class is used for basic console extensions, and its use is described in "Implementing the NavTreeExtension Interface" in Extending the Administration Console.).

Note: You need not implement all the methods in this interface. Simply return null for the methods you choose not to implement.

Table 12-1 shows the security provider-related dialog screens that you are most likely to replace, as well as the methods in the SecurityExtension interface that you need to implement to replace them.

Table 12-1 Using the SecurityExtension Interface

To Replace Dialog Screens Used to...

Implement the...

Configure a new custom security provider and edit an existing custom security provider's configuration

getExtensionForProvider method

Create a new user and edit an existing user. (For use with custom Authentication providers.

getExtensionForUser method

Create a new group and edit an existing group. (For use with custom Authentication providers.

getExtensionForGroup method

Create a new role and edit an existing role. (For use with custom Role Mapping providers.)

getExtensionForRole method

Create a new security policy and edit an existing security policy. (For use with custom Authorization providers.)

getExtensionForPolicy method


 

Note: For more detailed information, see the WebLogic Server 7.0 API Reference Javadoc for the SecurityExtension interface and the Extension class.

 


How a Console Extension Affects the Administration Console

Whether you write a console extension that is meant is to replace the BEA-provided dialog screens for configuring a custom security provider, or the dialog screens for creating and editing users, groups, roles, or security policies that are associated with security providers, the WebLogic Server Administration Console will be affected in the same way.

As an example, the following process will occur when you or an administrator attempt to configure a custom security provider using the WebLogic Server Administration Console:

  1. If you or an administrator click a Configure a New Security_Provider_Type... link on one of the Administration Console's dialog screens (examples of which are shown in the top portion of Figure 12-1), the Administration Console attempts to locate a console extension for the custom security provider.

    Figure 12-1 Configuring the Sample Authentication Provider


     

    If you or an administrator are editing a custom security provider's configuration (rather than adding it as step 1 describes), the Administration Console attempts to locate a console extension when you click the hyperlinked name of the custom security provider (examples of which are shown in the bottom portion of Figure 12-1).

  2. If the Administration Console detects that a console extension for the security provider is available, the Administration Console displays the JavaServer Page (JSP) specified by the URL that is returned from the getExtensionForProvider method (or other getExtensionFor* method described in Table 12-1).
  3. You or an administrator use the JSP to configure and manage the custom security provider, instead of the BEA-provided interface.

 

Back to Top Previous Next