Preparations
for the execution of the sample |
-
To set up the Administration Server for the Java Authentication Exit,
the Authentication.class file must be in the sever's CLASSPATH. Do this by adding the
fmctoaut.jar file to the Administration Server's CLASSPATH. It is located in the
/smp/java/exit/ directory.
-
To enable the Authentication Exit, see the Programming Guide and use the following
command:
fmczchk -c inst:m,RTAuthenticationExitTypeServer,java
If the Administration Server is already running, shut down the server and
restart it for the changes to take effect.
-
To use the AuthenticationClient, generate your own X509 certificate. This helps to avoid problems concerning the validity of the certificate. The generation of X509
certificates can be done using the keytool utility of jdk 1.2.2. The following example shows how to create an X509 certifcate for the Administrator user.
-
Generate Key pair for the user:
>keytool -genkey -alias admin
Enter keystore password:
What is your first and last name?
[Unknown]: Administrator
What is the name of your organizational unit?
[Unknown]: AdminUnit
What is the name of your organization?
[Unknown]: AdminOrg
What is the name of your City or Locality?
[Unknown]: AdminCity
What is the name of your State or Province?
[Unknown]: AdminState
What is the two-letter country code for this unit?
[Unknown]: DE
Is correct?
[no]: y
Enter key password for
(RETURN if same as keystore password):
-
Export an X509 certificate for the user with alias admin out of the keystore:
>keytool -export -alias admin -file AdminCert.cert
The AuthenticationClient tries to load an X509 certificate stored in the file AdminCert.cert.
If you have other certificate files you can pass their names as an argument to the AuthenticationClient.
Note, however, that the sample implementation of the Authentication Exit only
recognizes a small number of user names (see Authentication.java for details)!
-
To test the java authentication exit, you can use the AuthenticationClient. Start it by typing:
java com.ibm.workflow.java.exit.sample.AuthenticationClient [filename of certificate]
|