How to run the java custom authentication scheme provided with the sample SDK.

Document ID : KB000050049
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Here are the details steps to run the java custom authentication scheme provided with the sample SDK.

Solution:

  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 PS

  4. Create the authentication scheme

    • Using the PS adminUI create a custom template authentication scheme

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

  5. Test it

    Associate this authentication scheme to a protected realm

    That's it !!!

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