The message consumer plug-in is a Java program that implements the Message Consumer Extension API. The plug-in lets you implement your own business logic for processing assertions, such as rejecting an assertion and returning a status code. This additional processing works together with the standard processing of an assertion.
During authentication, the system first tries to process the assertion by mapping a user to its local user store. If CA SiteMinder® Federation cannot find the user, it calls the postDisambiguateUser method of the message consumer plug-in.
If the plug-in successfully finds the user, the process continues to the second phase of authentication. If the plug-in cannot map the user to a local user store, the plug-in returns a UserNotFound error. The plug-in can optionally use the redirect URL feature. Without the consumer plug-in, the redirect URLs are based on the error that the SAML authentication scheme generates.
During the second phase of authentication, the system calls the postAuthenticateUser method of the message consumer plug-in, if the plug-in is configured. If the method succeeds, CA SiteMinder® Federation redirects the user to the requested resource. If the method fails, you can configure the plug-in to send the user to a failure page. The failure page can be one of the redirect URLs that you can specify with the authentication scheme configuration.
Reference information (method signatures, parameters, return values, data types), and the constructor for UserContext class, are in the Java SDK Programming Reference. Refer to the MessageConsumerPlugin interface.
To configure the plugin:
Create a custom message consumer plug-in by implementing the MessageConsumerPlugin.java interface. The minimum requirements for the implementation class are listed in the following procedure.
Follow these steps:
The MessageConsumerPlugin includes the following four methods:
Performs initialization procedures that the plug-in requires. CA SiteMinder® calls this method once for each plug-in instance, when the plug-in is loaded.
Performs any rundown procedures that the plug-in requires. CA SiteMinder® calls this method once for each plug-in instance, when CA SiteMinder® is shutting down.
Provides processing to disambiguate a user when the authentication scheme is unable to do so. Alternatively, this method can add data for new federation users to a user store. This method receives the decrypted assertion. The decrypted assertion is added to the properties map passed to plug-in under the key "_DecryptedAssertion".
Provides additional code to determine the outcome of assertion processing, regardless of whether the Policy Server processing is a success or failure.
The product provides the following samples of the Message Consumer plug-in class:
The default location for the samples is:
C:\Program Files\FederationManager\sdk\java\sample
The package name is com\ca\federation\sdk\plugin\sample.
/FederationManager/sdk/java/sample
The package name is com/ca/federation/sdk/plugin/sample.
After you have coded your implementation class for the MessageConsumerPlugin interface, compile it and verify that CA SiteMinder® Federation can find your executable file.
Follow these steps:
federation_install_dir\siteminder\bin\jars\SmJavaApi.jar
federation_install_dir is the directory where you installed CA SiteMinder® Federation
Locate the JVMOptions.txt file in the directory federation_mgr_installation_home\siteminder\config.
Note: Do not modify the classpath for the existing xerces.jar, xalan.jar, or SmJavaApi.jar.
After writing a message consumer plug-in and compiling it, enable the plug-in by configuring settings in the Administrative UI. The UI settings tell CA SiteMinder® Federation where to find the plug-in.
Do not configure the plug-in settings until you deploy the plug-in.
To enable the message consumer plug-in
Select the Consumer-to-Producer or SP-to-IdP partnership that you want to modify.
Specify the Java class name for the plug-in, For example, a sample class included with the SDK is:
com.ca.messageconsumerplugin.MessageConsumerPluginSample
Specify a string of parameters that are passed to the plug-in specified in the Full Java Class Name field.
Use the stop and start shortcuts as follows. If you logged in as a network user and not a local administrator, right-click the shortcut and select Run as administrator.
a. Open a command window.
b. Run the following scripts:
federation_install_dir/fedmanager.sh stop
federation_install_dir/fedmanager.sh start
Note: Do not stop and start the services as the root user.
Copyright © 2014 CA.
All rights reserved.
|
|