To protect hosted Java 2 Platform, Enterprise Edition (J2EE) applications that may require various security policies, you can install a J2EE Policy Agent (called the Policy Agent for short in the rest of this article). The J2EE security infrastructure provides both declarative and programmatic security, independent of platforms, and is supported by all J2EE platform-compliant application servers. For details on how to use declarative and programmatic security on the J2EE platform, see the chapter, "Security," in The J2EE Tutorial. A key function of the Policy Agent is to enable role-to-principal`mapping for protected applications with the principals of Sun Java System Access Manager (formerly Sun Java System Identity Server, called Access Manager for short). Thus, at runtime, evaluation of J2EE policies occurs in accordance with the information available in Access Manager. Subsequently, you can configure applications to be protected by the Policy Agent, which offers security services and other capabilities, such as Single Sign-On (SSO). In addition, the Policy Agent supports Access Manager-based URL policies for enforcing access control over resources that are hosted in the application server's Web container. This paper showcases the components of the Policy Agent, its capabilities, and its installation and configuration procedures on Oracle Application Server 10g. This version of the Policy Agent is compatible with Oracle Application Server 9i Release 2. Contents
Components
The Policy Agent contains two main components:
To recap, these components work in tandem with Access Manager and enforce authentication and authorization for users who attempt to access protected applications. Capabilities
To take advantage of some of the Policy Agent's capabilities, you must modify the configurations of your applications. Be sure to become familiar with the installation and configuration procedures described in these two chapters in the J2EE Policy Agents Guide:
Support for URL Policies
The current release of Policy Agents supports Access Manager-based URL policies that protect Web-tier resources, such as URLs that point to Java Servlets, JavaServer Pages (JSP) content, HTML files, images, and others.
Support for J2EE Security
You can install the J2EE Policy Agent to protect hosted J2EE applications. Recall that the J2EE platform infrastructure offers platform-independent declarative and programmatic security for compliant J2EE application servers. The Policy Agent helps enable role-to-principal mapping for protected J2EE applications with Access Manager principals. Thus, when the application runs, the J2EE policies are evaluated according to the information in Access Manager. You can protect hosted applications by configuring them for the Policy Agent's security services, including SSO and other key features.
Other Capabilities
The Policy Agent can more tightly secure deployed applications. You can also customize its environment to suit the deployment. Here is a summary of the Policy Agent's capabilities:
Agent Filter's Operation Modes
Depending on your security requirements, you specify the agent filter's operation mode in the
Regardless of the mode, once you have configured the agent realm, it continues to function. If you have configured J2EE security with the agent realm in place, a negative evaluation of J2EE security policies may result in some cases. However, some filter operation modes do not require agent realms.
The following subsections describe the agent filter modes.
Mode 1:
NONEThe This mode does not require the agent realm.
Mode 2:
SSO_ONLYThe You can safely disable the agent realm; it's not in use in this mode.
Mode 3:
J2EE_POLICYIn the If the application uses declarative security in the Web tier, you must configure the agent to enable that feature. For details, see "Enabling Web-Tier Declarative Security" in the J2EE Policy Agents Guide. While running in the This mode requires that you configure the agent realm in the application server.
Mode 4:
URL_POLICYIn the
Mode 5:
ALLThe We strongly recommend that you use the Policy Agent Tools
With the Policy Agent tools, you can configure the Policy Agent for new application server instances, where supported. You can also encrypt plain text strings--sometimes a necessary step for changing passwords. For details, see "Agent Tools" in the J2EE Policy Agents Guide. Policy Agent APIs
The Policy Agent runtime provides access to all the Access Manager APIs that can further enhance the security of applications. On top of these APIs are APIs that enable applications to locate the SSO token string that is associated with the user who is logged on. You can use the APIs from either within the Web container or the Enterprise JavaBeans (EJB) container of the application server. For details, see "Agent APIs" in the J2EE Policy Agents Guide. Product Comparisons
Nowadays, most vendors that integrate with Oracle's application server perform simple SSO integrations. By providing five different operation modes, the Policy Agent by far surpasses its competitors in robustness. The The Policy Agent is built on a software bus architecture that enables Internet service providers (ISPs) to plug in software modules on a common bus. The architecture's hierarchical data design supports hot-swapping configuration data at runtime. In addition, the framework contains built-in features that shield against misconfigurations that may lead to infinite loops or denial-of-service attacks. Above all, the Policy Agent for Oracle Application Server 10g is a unique mechanism that protects two virtual machines (the OC4J instance and the Enterprise Manager instance), which run on two separate ports, with the same instance of the Policy Agent. Preinstallation and Postinstallation Procedures for Policy Agent on Oracle Application Server 10g
This section describes the procedures before and after installing the Policy Agent on Oracle Application Server 10g.
Preinstallation
Before installing the Policy Agent for Oracle Application Server 10g, do the following:
Postinstallation
Once installation is complete, do the following:
The following subsections contain more details. Creating Oracle Application Server 10g Administrative Users and Roles By default, the installation program configures a second agent to protect Enterprise Manager. Without that agent, Enterprise Manager supports basic authentication with the default realm from Oracle Application Server 10g. The Policy Agent, however, modifies Enterprise Manager's To enable users to authenticate with Enterprise Manager and perform tasks from its console, you must create two users and two related roles in Access Manager:
The document "Identity Management" details how to create users and roles and add users to roles in Access Manager.
Installing the Agent Filter for Deployed Applications You can install the agent filter by editing the deployment descriptor of the application you'd like to protect. Note the following:
Follow this procedure:
You can then redeploy your application on the application server. For details on sample deployment descriptors specific to Oracle Application Server 10g, see "Assembly Descriptors" in the J2EE Policy Agents Guide. Installing Applications from Enterprise Manager Console You can now deploy the application from the Enterprise Manager Console or the As you progress through the installation, you'll notice that Enterprise Manager has installed a custom User Manager (
Configurations of Policy Agent
While installing the Policy Agent for Oracle Application Server 10g, the installation program configures a second agent in the For Enterprise Manager The installation program does not inquire about the protocol or the port of Enterprise Manager. Instead, it assumes a default protocol (
For Oracle Application Server 10g Once you have installed the Policy Agent, you can configure it to accomplish the following:
In fact, to enable some of the Policy Agent's capabilities, such as Web-tier declarative security support, you must perform several additional configurations for Oracle Application Server 10g applications, as described in "Enabling Web-Tier Declarative Security" in the J2EE Policy Agents Guide. The Policy Agent's configuration is largely controlled by the properties in the For more details on configuring Policy Agents, see Chapter 3, "Agent Configuration," in the J2EE Policy Agents Guide. References
About the Authors
Krishnendu Chakraborty, a member of the Sun Java System Access Manager development team, joined Sun four years ago after a stint at Oracle. He has programmed extensively with Java, HTTP, XML, and database technologies. Arvind Prabhakar has been working with the J2EE platform since 1997. He's the architect of J2EE Policy Agents for Access Manager. Marina Sum is a staff writer for Sun Developer Network. She has been writing for Sun for 15 years, mostly in the technical arena. | ||||||||||||||||||||||||||||||||||
|
| ||||||||||||