The following describes the steps needed to properly compile and test
the Siteminder Java SDK Active Response sample.
To set up and use the Siteminder SDK sample for Active Responses, do
- Be sure you have installed the JDK, and "<installed JDK>\bin" is in
your system path;
- Go to the "<installed SDK>\sdk\samples\javaazapi" folder;
- Run "java-build.bat" (this will compile the Active Expression
examples into their '.class' files);
- Create a new directory tree as follows: "<your working folder
- Move all class files into this new subdirectory as follows: "move
- While still in the "<installed SDK>\sdk\samples\javaazapi" folder,
run the following command: "jar -cf ActiveResponseSample.jar
(Doing this will place the classes in the proper hierarchy within the
- Copy "ActiveResponseSample.jar" to the "<installed Policy
- Edit the "<installed Policy Server>\config\JVMOption.txt"
configuration file as follows:
+ Add the newly created jarfile to the "-Djava.class.path=" parameter,
e.g.: "-Djava.class.path=<other jarfiles, etc.>;C:\Program Files\netegrity\siteminder\bin\thirdparty\ActiveResponseSample.jar"
- Restart the Policy Server, so that it will pick up the modified java
- To try the Active Response sample, and send results to a cookie,
create your Active Response as follows:
(NOTE: do not include the quotes)
Cookie Name: "userDNtest"
Library Name: "smjavaapi"
Function Name: "JavaActiveExpression"
Parameters: "com.netegrity.sdk.javaazapi.ActiveResponseSample People"
- Under the "Advanced" tab, the following will be seen :
usertest=<@lib="smjavaapi" func="JavaActiveExpression" param="com.netegrity.sdk.javaazapi.ActiveResponseSample People"@>
When this response is added to a domain policy, an authenticated
user will see a cookie returned from the server, whose name is
"userDNtest", and whose value is the user's DN. In this sample
function, it will only return the user's DN if the user is part of
the Organization Unit named "People".