If you are writing your own Custom Authentication module based on the AMLoginModule SPI or a pure JAAS module, then you can skip this step. Otherwise, after writing the sample Login Module, compile and deploy the sample found under AccessManager-base/samples/authentication/spi/providers.
Set the following environment variables.
These variables will be used to run the gmake command. You can also set these variables in the Makefile. This Makefile is in the following directory: AccessManager-base /samples/authentication/spi/providers.
JAVA_HOME: Set this variable to your installation of JDK. The JDK should be version 1.3.1_06 or higher.
CLASSPATH: Set this variable to refer to am_services.jar which can be found in the Idetnity_base/lib directory. Include jaas.jar in your classpath if you are using JDK version less than JDK1.4
BASE_DIR: Set this variable to the directory where the Access Manager is installed.
BASE_CLASS_DIR: Set this variable to the directory where all the Sample compiled classes are located.
JAR_DIR: Set this variable to the directory where the JAR files of the Sample compiled classes will be created.
In the AccessManager-base/samples/authentication/spi/providers directory, run gmake.
Copy LoginModuleSample.jar from JAR_DIR to AccessManager-base/web-src/services/WEB-INF/lib .
Copy LoginModuleSample.xml from AccessManager-base /samples/authentication/spi/providers to AccessManager-base /web-src/services/config/auth/default .
Redeploy the amserver.war file.
In AccessManager-base/bin/amsamplesilent, set Deploy Level variable as follows:
DEPLOY_LEVEL=21
In AccessManager-base/bin/amsamplesilent, set container-related environment variables.
On Sun Java System Web Server 6.1, where /amserver is the default DEPLOY_URI:
SERVER_HOST=WebServer-hostName SERVER_PORT=WebServer-portNumber SERVER_PROTOCOL=[http | https] SERVER_DEPLOY_URI=/amserver WEB_CONTAINER=WS6 WS61_INSTANCE=https-$SERVER_HOST WS61_HOME= WebServer-base-directory WS61_PROTOCOL=$SERVER_PROTOCOL WS61_HOST=$SERVER_HOST WS61_PORT=$SERVER_PORT WS61_ADMINPORT=WebServer-adminPortWS61_ADMIN=WebServer-adminUserName
On Sun Java System Application Server 7.0, where /amserver is the default DEPLOY_URI:
SERVER_HOST=ApplicationServer-hostName SERVER_PORT=ApplicationServer-portNumber SERVER_PROTOCOL=[http | https] SERVER_DEPLOY_URI=/amserver WEB_CONTAINER=AS7 AS70_HOME=/opt/SUNWappserver7 AS70_PROTOCOL=$SERVER_PROTOCOL AS70_HOST=$SERVER_HOST AS70_PORT=$SERVER_PORT AS70_ADMINPORT=4848 AS70_ADMIN=admin AS70_ADMINPASSWD=ApplicationServer-adminPassword AS70_INSTANCE=server1 AS70_DOMAIN=domain1 AS70_INSTANCE_DIR=/var/opt/SUNWappserver7/domains/ ${AS70_DOMAIN:-domain1}/${AS70_INSTANCE:-server1} AS70_DOCS_DIR=/var/opt/SUNWappserver7/domains/${AS70_DOMAIN:-domain1}/ ${AS70_INSTANCE:-server1}/docroot #If Application Server is SSL Enabled then set the following: #AS70_IS_SECURE=true #SSL_PASSWORD=SSLpassword
On other supported platforms:
Set platform-specific variables as is appropriate for the container.
Redeploy the services web application by running the following command:
AccessManager-base/bin/amconfig -s AccessManager-base/bin/amsamplesilent
Restart the container instance.
Web Server example:
/WebServer-base-directory/ https-WebServer-instanceName/restart
Application Server example:
/var/opt/SUNWappserver7/domains/${AS70_DOMAIN:-domain1}/ ${AS70_INSTANCE:-server1}/bin/restartserv