|
| By Anant Kadam and Marina Sum, September 25, 2007 |
|
| |
Sun Java System Access Manager 7.1 (henceforth, Access Manager) integrates authentication and authorization services, policy agents, identity management, and identity federation for protecting network resources. Subsequently, you can secure access to resources and manage the identities of the users who access them.
You can deploy Access Manager on most platforms on most containersthat is, most Web servers or application serversthat comply with the Java Servlet 2.3 API Specification. Such was not always the case; see the appendix.
This article describes a simple and efficient way to install, configure, and deploy Access Manager on Sun Java System Application Server (henceforth, Application Server), which is also an open-source project called GlassFish. On average, the entire process takes less than 10 minutes to complete and so is especially handy for prototypes.
Contents| |
| |
| |
First, download the following software:
Figure 1: File Structure of Access Manager
|
jdk14 and
jdk15 binaries is size. Sun's JDK 1.5.x includes most of the Java archive (JAR) files for Java Web Services Developer Pack (Java WSDP), but those files are
not part of Access Manager for the containers that run under Sun's JDK 1.5.x. The example in this article uses the
amserver.war file under
Access_Manager_install_dir
/applications/jdk15.
| |
If you have enabled Security Manager in the Java virtual machine, add the Access Manager-related permissions to Application Server's
server.policy file, as follows.
// ADDITIONS FOR Access Manager
grant codeBase "file:\${com.sun.aas.instanceRoot}/applications/j2ee-modules/amserver/-" {
permission java.net.SocketPermission "*", "connect,accept,resolve";
permission java.util.PropertyPermission "*", "read, write";
permission java.lang.RuntimePermission "modifyThreadGroup";
permission java.lang.RuntimePermission "setFactory";
permission java.lang.RuntimePermission "accessClassInPackage.*";
permission java.util.logging.LoggingPermission "control";
permission java.lang.RuntimePermission "shutdownHooks";
permission javax.security.auth.AuthPermission "getLoginConfiguration";
permission javax.security.auth.AuthPermission "setLoginConfiguration";
permission javax.security.auth.AuthPermission "modifyPrincipals";
permission javax.security.auth.AuthPermission "createLoginContext.*";
permission java.io.FilePermission "<<ALL FILES>>", "execute,delete";
permission java.util.PropertyPermission "java.util.logging.config.class", "write";
permission java.security.SecurityPermission "removeProvider.SUN";
permission java.security.SecurityPermission "insertProvider.SUN";
permission javax.security.auth.AuthPermission "doAs";
permission java.util.PropertyPermission "java.security.krb5.realm", "write";
permission java.util.PropertyPermission "java.security.krb5.kdc", "write";
permission java.util.PropertyPermission "java.security.auth.login.config", "write";
permission java.util.PropertyPermission "user.language", "write";
permission javax.security.auth.kerberos.ServicePermission "*", "accept";
permission javax.net.ssl.SSLPermission "setHostnameVerifier";
permission java.security.SecurityPermission "putProviderProperty.IAIK";
permission java.security.SecurityPermission "removeProvider.IAIK";
permission java.security.SecurityPermission "insertProvider.IAIK";
};
// END OF ADDITIONS FOR Access Manager
|
Note: If you deploy Access Manager 7.1 with a name other than
amserver, change the
amserver string in the
grant statement correspondingly. Alternatively, just cite
grant {...} for testing.
Note: If your container of choice is IBM WebSphere, set the following two Java virtual machine options in the container's
server.xml file:
-DamCryptoDescriptor.provider=IBMJCE -DamKeyGenDescriptor.provider=IBMJCE |
For example:
genericJvmArguments="-DamCryptoDescriptor.provider=IBMJCE -DamKeyGenDescriptor.provider=IBMJCE" |
Afterward, restart Application Server for the changes to take effect.
| |
Now deploy the Access Manager WAR file on any Web container that is supported by Sun Java Enterprise System 5. Three steps are involved:
Deploying the WAR File
To deploy the WAR file:
http://localhost:4848.
admin; the default password is
adminadmin.
/applications/jdk15/amserver.war) and click Deploy.
amserver under Deployed Web Applications, as shown in Figure 2.
Figure 2: Successful Deployment of Access Manager on Application Server
(Click image for larger view.)
|
Configuring Access Manager
To configure Access Manager:
http://
hostname.domain_name
.com:
portnumber
/amserver, where:
.com is the name of the host on which Access Manager is deployed.
Figure 3: Configurator Page in Application Server
(Click image for larger view.)
|
amAdmin password (for example,
admin123) and the configuration directory (for example,
/amconfig).
In this example, File System is the default for storing service configuration data. That is, all the service configuration files are under the
config_dir
/
deploy_URI
/sms directory,
/amconfig/amserver/sms in this case.
After successful configuration, Access Manager displays the login screen, as shown in Figure 4.
Figure 4: Access Manager Login Screen
(Click image for larger view.)
|
Verifying the Configuration
Finally, verify the configuration by logging in. The Access Manager Administration Console is displayed, as shown in Figure 5.
Figure 5: Access Manager Administration Console
(Click image for larger view.)
|
| |
As soon as configuration is complete, Access Manager creates the following files in your system:
/amconfig. See its file structure in Figure 6.
Figure 6: File Structure in the Configuration Directory
|
user.home directory. You can change that location as desired. For details on the procedure, see
"Deploying Access Manager as a Single WAR File" in the
Sun Java System Access Manager 7.1 Postinstallation Guide.
\ and
/ symbols with the
_ symbol. For example, if the user running Application Server is root, the bootstrap file in this example is
/AccessManager/AMConfig_opt_SUNWappserver_domains_domain1_applications_j2ee-modules_amserver_.
| |
Access Manager offers no scripts for undeploying configured instances. To undeploy Access Manager:
| |
To test with various configuration values without undeploying Access Manager:
http://
hostname.domain_name
.com:
portnumber
/amserver.
| |
In its earlier versions, the installer deployed Access Manager as packages. They were a collection of JAR files along with supporting XML, JavaServer Pages (JSP), HTML, and GIF files; also locale files and properties in the
AMConfig.properties and
serverconfig.xml files, the latter for directory configurations. That approach led to a number of problems, as follows:
Consequently, the Access Manager engineering team set a goal to repackage the components to be deployable as J2EE applications. That goal became a reality in Access Manager 7.1: You can now conveniently deploy it as a single Web application, hassle free.
| |
