masvi10

Running the Java Custom Authentication Scheme

Discussion created by masvi10 Employee on Nov 1, 2011
Latest reply on Feb 25, 2019 by Mark.ODonohue

Tuesday Tip by Julien Nitot, Senior Support Engineer, for 11-1-2011

How to run the Java Custom Authentication Scheme provided with the Sample SDK
----------------------------------------------------------------------------------------------------

1. Compile the class

* Create the directory : C:\Program Files\netegrity\sdk\com\netegrity\sdk\javaauthapi
* Copy the AuthApiSample.java and java-build.bat from C:\Program Files\netegrity\sdk\samples\javaauthapi to C:\Program Files\netegrity\sdk\com\netegrity\sdk\javaauthapi
* Go to C:\Program Files\netegrity\sdk\com\netegrity\sdk\javaauthapi and run java-build.bat

the AuthApiSample.class should be present in C:\Program Files\netegrity\sdk\com\netegrity\sdk\javaauthapi

2. Build the jar

* Go to C:\Program Files\netegrity\sdk
* Run the following : "C:\Program Files\Java\jdk1.6.0_21\bin\jar" cvf MyCustomClass.jar com
(The MyCustomClass.jar should be present in C:\Program Files\netegrity\sdk)

3. Add the jar to the JVMOptions.txt of the policy server

* Edit the C:\Program Files\netegrity\siteminder\config\ JVMOptions.txt
* Add ;C:/Program Files/netegrity/sdk/MyCustomClass.jar to the end of the classpath definition
* Restart the Policy Server

4. Create the authentication scheme

* Using the Policy Server AdminUI, create a custom template authentication scheme, enter the following values:

Library : smjavaapi
Secret: leave blank
Confirm Secret: leave blank
Parameter: com.netegrity.sdk.javaauthapi.AuthApiSample

5. Test it

Next, associate this authentication sheme to a protected realm.

Please note: You may need to copy the jvm.dll from C:\Program Files\Java\jre6\bin\client to C:\Program Files\Java\jre6\bin\server

Outcomes