JRun security architecture

Security is an important aspect of any application. To address the security issues involved with Internet applications, remote applications, and enterprise applications, J2EE APIs define authentication and authorization mechanisms to control user access to application resources. Authentication and authorization are defined as follows:

The JRun authentication mechanism is a clustered service. What this means is that a user who is authenticated on one JRun server in a cluster is automatically authenticated on all servers in the cluster.

J2EE security usage areas

To handle all aspects of an authentication and authorization system, J2EE security covers multiple areas, each of which is handled by different roles:

JAAS overview

Earlier J2EE specifications did not specify a standard mechanism for integrating applications with existing security systems and user stores, leaving this integration mechanism to be handled in a proprietary manner by each application server vendor. J2EE 1.3, however, requires that application servers use the Java Authentication and Authorization Service (JAAS) as the security framework. JAAS is a set of packages that enables JRun to authenticate users and enforce access controls in a modular fashion.

JRun calls JAAS to perform authentication and authorization

JAAS was originally an optional package in the Java 1.3 SDK and is integrated into the Java 1.4 SDK.

JAAS provides a Plug and Play mechanism that enables you to customize the system to integrate with existing authentication user stores, such as LDAP or a relational database. You can find detailed JAAS information at http://java.sun.com.

JAAS allows authentication to be performed in a pluggable fashion. That is, you can substitute a customized login module and JRun will automatically call that login module's login method when performing authentication. For more information, see "Extending JRun security".

It is important to remember that JAAS is not solely a J2EE technology. You can use it for any Java program and, by default, JAAS authorization uses policy files. However, most J2EE application servers (including JRun) do not use policy files for authorization. JRun handles authorization by extending the JAAS authentication mechanism. When the JRun security manager receives an authorization request, it calls the login module's login method, passing the username and a Collection object containing the set of permissible roles. The login method then determines whether the authenticated user is a member of an authorized role.

JRun default security implementation

The JRun security architecture uses JAAS-based login modules to perform authentication and authorization using user and role stores that are tightly bound to the login module. A login module implements the javax.security.auth.spi.LoginModule interface. You code the logic in the login module, and JRun uses the JAAS API to call the login module at the appropriate times.

JRun provides a default login module that accesses an XML-format user and role store. It also provides a user manager service to manage users and roles.

The JMC uses this system to control user access, and you can use it in web applications, EJBs, and other components, as appropriate. For more information, see "Using the default JRun security mechanism".

Extending JRun security

Many sites have a pre-existing security infrastructure that defines users and their roles. Use one of the following options to integrate with your existing infrastructure:

You can optionally implement a site-specific user manager for dynamic user store update. However, in most cases, customized security implementations do not require this functionality. For more information, see "Defining a custom user manager".

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/jrun/4/JRun_Administrators_Guide/authentic2.htm