SiteMinder
Java SDK r12.51


com.netegrity.policyserver.smapi
Interface MessageConsumerPlugin


public interface MessageConsumerPlugin

The base interface for providing Message Consumer Extension functionality. This plug-in extends the SiteMinder SAML 1.x, SAML 2.0 and the WS-Federation authentication schemes.

To develop the plug-in implementation:

To integrate the MessageConsumerPlugin with the SiteMinder SAML or WS-Federation authentication scheme:

Since:
SDK 6.0 SP3

Field Summary
static int AUTH_REASON_FEDERATION_USER_NOT_IN_DIR
          Constant to indicate the configuration does not provide correct or sufficient information.
static int AUTH_REASON_INVALID_MESSAGE
          Constant to indicate the response message is not formed correctly.
static int AUTH_REASON_NO_LOGIN_ID
          Constant to indicate the configuration does not provide correct or sufficient information.
static int AUTH_REASON_UNACCEPTED_MESSAGE
          Constant to indicate the response message is not accepted as a user credential.
static int FAILURE
          Constant to indicate the processing of the response message has failed.
static int SUCCESS
          Constant to indicate successful processing of the response message.
 
Method Summary
 boolean init(APIContext context)
          Performs any initialization procedures that MessageConsumerPlugin requires.
 int postAuthenticateUser(APIContext apiContext, java.lang.String parameters, java.lang.String message, java.util.Map props, int statusCode)
          Performs customization of federation credential validation.
 int postDisambiguateUser(APIContext apiContext, UserContext userContext, java.lang.String parameters, java.lang.String message, java.util.Map props, java.lang.String loginID, java.lang.StringBuffer output)
          Performs additional user disambiguation.
 boolean release(APIContext context)
          Performs any close-down procedures that the MessageConsumerPlugin requires.
 

Field Detail

AUTH_REASON_NO_LOGIN_ID

static final int AUTH_REASON_NO_LOGIN_ID
Constant to indicate the configuration does not provide correct or sufficient information. The LoginID is unattainable from the federation message.

See Also:
Constant Field Values

AUTH_REASON_FEDERATION_USER_NOT_IN_DIR

static final int AUTH_REASON_FEDERATION_USER_NOT_IN_DIR
Constant to indicate the configuration does not provide correct or sufficient information. The user was not found in the specified user store.

See Also:
Constant Field Values

AUTH_REASON_INVALID_MESSAGE

static final int AUTH_REASON_INVALID_MESSAGE
Constant to indicate the response message is not formed correctly. All the required elements might not be present.

See Also:
Constant Field Values

AUTH_REASON_UNACCEPTED_MESSAGE

static final int AUTH_REASON_UNACCEPTED_MESSAGE
Constant to indicate the response message is not accepted as a user credential.

See Also:
Constant Field Values

SUCCESS

static final int SUCCESS
Constant to indicate successful processing of the response message.

See Also:
Constant Field Values

FAILURE

static final int FAILURE
Constant to indicate the processing of the response message has failed. It has the value of UnknownUser authentication reason.

See Also:
Constant Field Values
Method Detail

init

boolean init(APIContext context)
             throws java.lang.Exception

Performs any initialization procedures that MessageConsumerPlugin requires.

SiteMinder calls this method when this MessageConsumerPlugin object is loaded. SiteMinder maintains a cache for all the instances, one instance per Policy Server. Each MessageConsumerPlugin is initialized only once.

Parameters:
context - A context object that provides methods for sending log, trace and error messages to the Policy Server.
Returns:
true if the initialization succeeds.
Throws:
java.lang.Exception - Thrown if anything happens unexpectedly; it is treated as an error.

release

boolean release(APIContext context)
                throws java.lang.Exception

Performs any close-down procedures that the MessageConsumerPlugin requires.

SiteMinder calls this method once for each instance of MessageConsumerPlugin class, when this object is unloaded, or SiteMinder is shutting down. SiteMinder maintains a cache for all the instances, one instance per Policy Server. Each MessageConsumerPlugin is released only once.

Parameters:
context - A context object that provides methods for sending log, trace and error messages to the Policy Server.
Returns:
true if the shutdown succeeds.
Throws:
java.lang.Exception - Thrown if anything happens unexpectedly; it is treated as an error.

postDisambiguateUser

int postDisambiguateUser(APIContext apiContext,
                         UserContext userContext,
                         java.lang.String parameters,
                         java.lang.String message,
                         java.util.Map props,
                         java.lang.String loginID,
                         java.lang.StringBuffer output)
                         throws java.lang.Exception
Performs additional user disambiguation. The Policy Server calls this method when the SAML authentication scheme cannot disambiguate the user. For SAML2.0, when encrypted data data (Assertion, Name ID, or Attribute) is used in an SSO transaction, the decrypted assertion can be retrieved by accessing the _DecryptedAssertion key of the props parameter.

Parameters:
apiContext - A context object that provides methods for sending log, trace, and error messages to the Policy Server.
userContext - A context object that provides directory information for user disambiguation.
parameters - The parameters string configured with the plug-in.
message - The federation message, which is the SAML Response element.
props - The Map object that contains all the name/value pair settings defined for the authentication scheme.
loginID - The available loginID, which can be used to search the user in the directory
output - The result buffer, which contains the user DN.
Returns:
The processing status, which is either an authentication reason code, or SUCCESS, or FAILURE. This return value is used as the real status for the SAML authentication scheme
Throws:
java.lang.Exception - Thrown when an error has occurred.

postAuthenticateUser

int postAuthenticateUser(APIContext apiContext,
                         java.lang.String parameters,
                         java.lang.String message,
                         java.util.Map props,
                         int statusCode)
                         throws java.lang.Exception

Performs customization of federation credential validation.

Parameters:
apiContext - A context object that provides methods for sending log, trace, and error messages to the Policy Server.
parameters - The parameters string configured with the plug-in.
message - The federation message, which is the SAML Response element
props - The Map object that contains all the name/value pair settings defined for the authentication scheme
statusCode - The current processing status.
Returns:
The processing status, which is either an authentication reason code, or SUCCESS, or FAILURE. This return value is used as the real status for the SAML authentication scheme.
Throws:
java.lang.Exception - Thrown when an error has occurred.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.