Programming in Java
The stmndr Software Development Kit (SDK) includes a set of documented application programming interfaces (APIs) in Java that let you integrate and extend the capabilities of stmndr within your specific environment.
SiteMinderSoftware Development Kit (SDK) includes a set of documented application programming interfaces (APIs) in Java that let you integrate and extend the capabilities of
SiteMinderwithin your specific environment.
Available Java APIs
The following APIs are available in Java:
- Policy Management API—use to develop a custom Administrative UI application, or to customize selected components of policy objects such as rules, policies, and responses within the application. Users of this API will be able to perform most of the data manipulations that users of the native Administrative UI can perform.
- Agent API—use to create custom agent applications for leveraging the authentication and authorization capabilities of the Policy Server. Using this API, you can also construct a secure communication tunnel to transmit application-specific data.
- DMS API—use to perform directory management operations on LDAP and ODBC directories.
- Authentication API—use to develop custom authentication schemes and integrate the custom schemes. It works as a Policy Server plug-in.
- Authorization API—use to develop modules for performing custom authorization functions. Modules that you develop using this API can be configured in the Administrative UI with active rules, active policies, and active responses. It works as a Policy Server plug-in.
The following table lists the package name of each API in SDK:
API Name: Package Name
Primary Interfaces and Classes
Agent API: netegrity.siteminder.javaagent
Policy Management API: com.netegrity.sdk.policyapi
SmPolicyApi, implemented by SmPolicyApiImpl
Authentication and Authorization APIs: com.netegrity.policyserver.smapi
SmAuthScheme (Authentication API)
ActiveExpression (Authorization API)
DMS API: com.netegrity.sdk.dmsapi
SmDmsApi, implemented by SmDmsApiImpl
Utilities package: com.netegrity.sdk.apiutil
The Utilities package contains methods that must be used to implement the Policy Management API and DMS API.
How Java APIs are Implemented
The following graphic shows how
SiteMinderimplements the APIs in Java:
You can use the Java APIs to write client applications that connect to a remote Policy Server. These applications have access to the following built-in functionality of Agent API in Java:
- Load balancing
The following graphic shows the network architecture of Java APIs:
The Policy Management API and DMS API use Agent API to access Policy Server. A single API client instance makes a single, secure, Agent API connection to Policy Server. As long as they share the same process space, multiple API clients can use a single Agent API connection. For example, you can use Agent API to establish a connection, then use that connection to make DMS API calls.
The SDK includes tested samples of
SiteMinderclient applications. The source files for these samples are located as follows:
- UNIX platforms:<install_path>/sdk/samples/<api-name>
- Windows platforms:<install_path>\sdk\samples\<api-name>
- The samples use properties defined in smjsdksample.properties, located in /sdk/properties. Before you run the Java samples, modify this file with settings for your environment.
- The smjsdksample.properties file also externalizes literal strings used for logging.
- The samples smjavaagentapi and javadmsapi use the policy store created by the sample javapolicyapi. Run smjavapolicyapi before running smjavaagentapi or javadmsapi.
- All the samples use the same logging options and output format.
- When executing the Java samples on a 64-bit UNIX operating environment, note the following:
- Use a 64-bit JVM. Running the 64-bit samples using a 32-bit JVM is not supported.
- If you are using the file java-run.sh (in the samples/smjavaagentapi folder) remove the comment indicator before the -d64 flag. Leave this flag commented out when on a 32-bit operating environment.
Java SDK API Reference
SiteMinderJavadoc to learn about a particular class or method. These details typically include syntax, parameters, return values, and exception information.
The description of each package, class, and interface in the Javadoc reference sometimes includes a
Sinceheading. This heading indicates the SDK version when the component was introduced. Individual methods and fields only include a Since heading if they were added in a later version of the class or interface.
Follow these steps:
- Download the SDK zip.
- Save and extract the zip locally.Thejavadoc-sdkfolder is created.
- Open thejavadoc-sdkand double-click theindex.htmlto open the Java API Reference.
Log Trace Information
Log Trace Information on Client Side
-Doption of the java tool and set the system property SMJAVASDK_LOG_INFO to
SiteMinderlogs the information to the standard output.
For example, if your Java Development Kit is on Windows and you want to trace the Policy Management API sample application, the command line would be:
java -DSMJAVASDK_LOG_INFO=true -classpath .;..\..\java\smjavasdk2.jar;..\..\java\smjavaagentapi.jar PolicyApiSample
Log Pure Java Agent API Trace Information
To log additional tracing information to debug problems when using the Pure Java Agent API, add the following parameter to the JVM:
java -Dcom.ca.siteminder.sdk.agentapi.enableDebug=true myClas
Note: This parameter is not applicable for the JNI-based Agent API.
Support for Custom Code
Software Development Kit (SDK) is supported as part of the standard offerings. Code written by customers or partners, however, is not supported. You are responsible for the code you write. If you require assistance designing or implementing SDK-based code, contact your Broadcom customer account team.