First Previous Next Last User Management Guide  

CHAPTER 2    Understanding Authentication Realms

This chapter is an overview of authentication realms and how the Directory subsystem allows Director to integrate with the Director database and third-party authentication mechanisms. It has these sections:

For more information    For background information about the Directory subsystem and other user services in Director, see About User-Related Services.

For more information    For information about setting up a realm, see Configuring Authentication Realms.

 
Top of page

About authentication and realms

Authentication is the process of verifying the identity of a user who is requesting access to protected resources. Authentication is typically performed by obtaining a user name and password and checking them against the list of users in your authentication realm. Typically, authentication is performed by your application server through either an internal server realm or an external realm like Windows NT or LDAP. The Directory subsystem also includes an API to add, modify, and delete users and groups.

The Directory subsystem provides these services to the other Director subsystems, relieving them of having to know about the application server-specific APIs available for authentication.

JAAS   The JAAS (Java Authentication and Authorization Services), now part of the J2EE 1.3 specification, is used in applications to authenticate users and enforce access controls—but is not currently implemented by all application servers that Director supports. The Directory subsystem will leverage JAAS when available for the authentication process. Since JAAS does not provide APIs to manage principals (users and groups), the Directory subsystem enhances the application framework by providing a common API for managing them.

 
Top of section

Realm types

A Director application can be configured with one of these access types:

 
Top of section

Pluggable realms

Director provides a set of pluggable realms for various application server vendors. A pluggable realm is set up to access a specific realm implementation, and can be configured using the Portal Project Wizard (See Configuring Authentication Realms). There are three basic type of pluggable realms that Director supplies::

Pluggable realm type

Description

PersistManager

This configuration implements a PersistManager class to provide writable access to users and groups stored in your Director database. This configuration does not use a third-party authentication mechanism.

Application server realms

Provide readable or writable access to the internal realms of specific application server vendors, and access to specific external realm through the exteNd application server.

LDAP realms

Provide writable access to the Novell eDirectory LDAP server and authentication integration with supported application server vendors.

 
Top of page

How the realm configurations work

This section summarizes Director's pluggable realm implementations for application server native realms and LDAP servers.

 
Top of section

exteNd application server realm

This realm is for the exteNd application server, which has providers for several readable realms as well as the SilverUsers readable/writable realm defined in the SilverMaster database (LDAP, Windows NT, and NIS+).

The Director EbiSilverServerRealm interface provides access methods to the SilverServer realm API.

authSilverStream

 
Top of section

exteNd application server compatibility realm

This realm exists for compatibility with ePortal 2.x directory services or any application that requires nested groups. It uses a set of database tables for user and group bindings. It also uses the exteNd application server realm's SilverUsers directory as its user repository.

 
Top of section

BEA WebLogic realm

This realm is for BEA WebLogic 6.x. It calls the underlying server API to provide readable access to external realms (LDAP and Windows NT) and readable/writable access to the default realm stored in the file system on the application server.

The Director EbiWebLogicRealm interface provides access methods to the WebLogic server realm API.

authWebLogic

 
Top of section

IBM WebSphere realm

This realm is for IBM WebSphere 4.x. Director accesses data through a custom registry based on a relational database to provide directory services. (IBM WebSphere does not provide a realm access API other than authentication.) All method calls go through the Director database.

For authentication, the Director EbiWebSphereRealm interface calls the WebSphere authentication method, which in turn calls through to the database.

authWebSphere

 
Top of section

PersistManager

This is a generic realm that can be used to access users and groups directly from the Director database using the Directory subsystem API. It does not rely on any native application server APIs.

authPersistManager

 
Top of section

LDAP server realms

For writable LDAP realms, Director provides:

The JNDI realm base class provides an administrator connection to the LDAP server for retrieving groups and users. This connection is internal, so unauthorized external access to data is prevented. A user's JNDI connection is stored as part of the user session when the user is authenticated through the realm.

authLdapAppServer

Authentication to an LDAP application server realm   The base class only supports generic LDAP authentication and does not provide authentication through an application server. This is provided by a separate class for each application server (see the diagram above). The application server realm overrides the authenticate() method in the JNDI realm super class and uses the application server API for authentication.

 
Top of page

Using the Directory subsystem API

The Directory subsystem provides API access to your configured realms and realm contents. It includes these interfaces:

Directory class

API package

Contents

EbiDirectoryDelegate

com.sssw.fw.directory.api

Methods for accessing and managing realms, users, and groups

EboDirectoryHelper

com.sssw.fw.directory.client

Directory helper methods for accessing users and security principals

EboFactory

com.sssw.fw.directory.client

Methods for getting the directory delegate and realm provider objects

 
Top of section

Getting a directory delegate

This code shows how to access a directory delegate and call the authUserPassword() method.

  EbiDirectoryDelegate dirService = com.sssw.fw.directory.client.EboFactory.getDirectoryDelegate();
  java.security.Principal prin = null;
  
  try {
      // Attempt to authenticate the user id and password
      prin = dirService.authUserPassword(context, uid, pwd);
  } catch (Exception ex) {}

 
Top of section

Portal login component

The Director core components include a generic interactive login page for authentication users. You can use it as a template for developing your own login mechanism.

PortalLogin

This component requires users to provide a user ID and password in order to be authenticated by the server for a specified realm.

For more information    For information about accessing the source, see the PortalLogin component in Samples.

 
Top of section

New User component

The Director core components also include a page that allows anonymous users to add themselves to the writable realm and automatically creates a profile for each new user.

The New User component is provided as a template for your own application. You can copy and customize the New User component or design a new one.

For more information    For more information, see Using the New User component.

 
Top of section

Source code for the PAC

You can access users and groups using the Portal Administration Console (PAC), as described in Using the Directory Section of the PAC. The PAC uses the Directory subsystem API to access realm users. The source files for the PAC are included with your exteNd Director installation at:

installDir/exteNdDirector/samples/src/com/sssw/portal/pac

 
Top of page

Writing a custom realm

You can implement your own realm to directly access a directory server—or you can rely on an existing database structure. You can create a custom security realm by implementing these interfaces in the com.sssw.fw.directory.api package:

Directory class

Contents

EbiRealm

Interface that custom realms need to implement if they wish to provide read-only directory services.

The directory manager loads instances of realms that implement this interface as well as the subinterface EbiWriteableRealm.

EbiWriteableRealm

Interface that custom realms need to implement if they wish to provide write access in the directory service.

The directory manager loads instances of realms that implement this interface as well as the superinterface EbiRealm.

EbiRealmUser

The wrapper principal used by custom realms. The original principal implementation can be used internally in order to leverage existing principal functionality and APIs.

EbiRealmGroup

The wrapper group principal used by custom realms. The original principal implementation can be used internally in order to leverage existing principal functionality and APIs.


    First Previous Next Last User Management Guide  

Copyright © 2000, 2001, 2002, 2003 SilverStream Software, LLC, a wholly owned subsidiary of Novell, Inc. All rights reserved.