SiteMinder
Java SDK r12.51


com.netegrity.policyserver.smapi
Class SAMLConfig

java.lang.Object
  extended by com.netegrity.policyserver.smapi.SAMLConfig

public class SAMLConfig
extends java.lang.Object

The SAMLConfig class facilitates getting Service Provider and Identity Provider properties through Policy Server native implementation.


Constructor Summary
SAMLConfig()
           
 
Method Summary
 int addAssertionConsumerServicetoSP(java.lang.String SAMLSPOid, java.lang.String[] SAMLSPAssertionConSvcs)
          Adds an Assertion Consumer Service to the SP.
 int addSAMLIdentityProvider(java.util.HashMap IDPinfo)
          Adds a given SAML Identity Provider.
 int addSAMLServiceProvider(java.lang.String AffiliateDomain, java.util.HashMap SPinfo)
          Adds a specified SAML Service Provider.
 int getAffiliatedIdentityProviders(java.lang.String affiliation, java.lang.String[] providers)
          Gets an array of OIDs of Identity Providers that belong to a specified SAML Affiliation.
 int getAffiliatedProviders(java.lang.String affiliation, java.lang.String[] providers)
          Gets an array of OIDs of providers that belong to a specified SAML Affiliation.
 int getAffiliatedServiceProviders(java.lang.String affiliation, java.lang.String[] providers)
          Gets an array of OIDs of Service Providers that belong to a specified SAML Affiliation.
 SAMLAffiliationInfo getAffiliationById(java.lang.String affiliationId, java.lang.String[] namesToGet)
          Gets SAMLAffiliationInfo class for the specified affiliation ID.
 SAMLAffiliationInfo getAffiliationByOid(java.lang.String oid, java.lang.String[] namesToGet)
          Gets SAMLAffiliationInfo class for the specified affiliation OID.
 SAMLIdentityProviderInfo getIdentityProviderById(java.lang.String providerId, java.lang.String[] namesToGet)
          Gets SAMLIdentityProviderInfo class for the given provider ID.
 SAMLIdentityProviderInfo getIdentityProviderByName(java.lang.String providerName)
          Gets Identity Provider configuration for a given Identity Provider.
 SAMLIdentityProviderInfo getIdentityProviderByOid(java.lang.String oid, java.lang.String[] namesToGet)
          Gets SAMLIdentityProviderInfo class for the specified provider OID.
 SAMLIdentityProviderInfo getIdentityProviderBySourceId(java.lang.String sourceId, java.lang.String[] namesToGet)
          Gets SAMLIdentityProviderInfo class for the specified provider source ID.
 java.util.HashMap getProviderPasswordsByID(java.lang.String providerID, ProviderType providerType)
          Gets all passwords associated with the indicated provider.
 java.util.HashMap getProviderPasswordsByOid(java.lang.String oid)
          Gets passwords for the specified provider OID.
 SAMLAffiliateInfo getSAMLAffiliateByID(java.lang.String providerID, java.lang.String[] namesToGet)
          Gets SAMLAffiliateInfo class for the specified SAML Affiliate object's consumer ID.
 SAMLAffiliateInfo getSAMLAffiliateByName(java.lang.String name, java.lang.String[] namesToGet)
          Gets SAMLAffiliateInfo class for the specified SAML Affiliate object name.
 SAMLAffiliateInfo getSAMLAffiliateByProducerSourceID(java.lang.String sourceID, java.lang.String[] namesToGet)
          Gets SAMLAffiliateInfo class for the given SAML Affiliate object's consumer ID.
 java.util.HashMap getSamlAffiliatePasswordsByName(java.lang.String name)
          Gets all passwords associated with the indicated affiliate.
 SAMLConsumerInfo getSAMLConsumerByID(java.lang.String providerId, java.lang.String[] namesToGet)
          Gets SAMLConsumerInfo class for the specified producer ID.
 SAMLConsumerInfo getSAMLConsumerByIssuer(java.lang.String issuer, java.lang.String[] namesToGet)
          Gets SAMLConsumerInfo class for the given Issuer.
 SAMLConsumerInfo getSAMLConsumerByOid(java.lang.String oid, java.lang.String[] namesToGet)
          Gets SAMLConsumerInfo class for the specified consumer OID.
 SAMLConsumerInfo getSAMLConsumerByParamSearchString(java.lang.String searchStr, java.lang.String[] namesToGet, int nSchemeType)
          Gets SAMLConsumerInfo class for the given Search String.
 SAMLConsumerInfo getSAMLConsumerBySrcID(java.lang.String srcID, java.lang.String[] namesToGet)
          Gets SAMLConsumerInfo class for the specified Source ID.
 java.util.HashMap getSAMLConsumerPasswordsByID(java.lang.String providerId)
          Gets SAML Consumer passwords for the specified producer ID.
 java.util.HashMap getSAMLConsumerPasswordsByIssuer(java.lang.String issuer)
          Gets SAML Consumer passwords, for the given Issuer.
 java.util.HashMap getSAMLConsumerPasswordsBySrcID(java.lang.String srcID)
          Gets SAML Consumer passwords, for the specified Source ID.
 SAMLServiceProviderInfo getServiceProviderById(java.lang.String providerId, java.lang.String[] namesToGet)
          Gets SAMLServiceProviderInfo class for the given provider ID.
 SAMLServiceProviderInfo getServiceProviderByName(java.lang.String providerName)
          Gets SAMLServiceProviderInfo class for the given provider name.
 SAMLServiceProviderInfo getServiceProviderByOid(java.lang.String oid, java.lang.String[] namesToGet)
          Gets SAMLServiceProviderInfo class for the given provider OID.
 int PolicyAPILogin(java.lang.String UserName, java.lang.String Password)
          Calls the underlying C Policy API Sm_PolicyApi_Login for Policy API login using the SiteMinder administrator credentials.
 boolean PolicyAPILogout()
          Calls the underlying C Policy API Sm_PolicyApi_Logout for log out of an administrator session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLConfig

public SAMLConfig()
Method Detail

PolicyAPILogin

public int PolicyAPILogin(java.lang.String UserName,
                          java.lang.String Password)
                   throws NativeCallbackError
Calls the underlying C Policy API Sm_PolicyApi_Login for Policy API login using the SiteMinder administrator credentials.

Parameters:
UserName - The SiteMinder administrator name
Password - The SiteMinder administrator password
Returns:
0 in case the login is successful Negative error code in case the login failed
Throws:
NativeCallbackError - in case an error was encountered during login

PolicyAPILogout

public boolean PolicyAPILogout()
                        throws NativeCallbackError
Calls the underlying C Policy API Sm_PolicyApi_Logout for log out of an administrator session.

Returns:
true in case the logout is successful false otherwise
Throws:
NativeCallbackError - in case an error was encountered during logout

getServiceProviderById

public SAMLServiceProviderInfo getServiceProviderById(java.lang.String providerId,
                                                      java.lang.String[] namesToGet)
                                               throws NativeCallbackError
Gets SAMLServiceProviderInfo class for the given provider ID.

Parameters:
providerId - The service provider ID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getServiceProviderByName

public SAMLServiceProviderInfo getServiceProviderByName(java.lang.String providerName)
                                                 throws NativeCallbackError
Gets SAMLServiceProviderInfo class for the given provider name. this method uses the PM API, therefore it requires a session to be established first

Parameters:
providerName - The SiteMinder name of the service provider.
Returns:
The service provider info or null in case no data is found. If the Administrator does not have permissions to manage system or domain objects, the SAMLServiceProviderInfo is returned with a single property called "NoPrivilege" - the value stored is irrelevent.
Throws:
NativeCallbackError

getServiceProviderByOid

public SAMLServiceProviderInfo getServiceProviderByOid(java.lang.String oid,
                                                       java.lang.String[] namesToGet)
                                                throws NativeCallbackError
Gets SAMLServiceProviderInfo class for the given provider OID.

Parameters:
oid - The identity provider OID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getProviderPasswordsByID

public java.util.HashMap getProviderPasswordsByID(java.lang.String providerID,
                                                  ProviderType providerType)
                                           throws NativeCallbackError
Gets all passwords associated with the indicated provider. The passwords will exist as byte[]s mapped to their attribute name.

Parameters:
providerID - The ID of the Provider.
providerType - The type of the Provider
Returns:
A SAMLServiceProviderInfo containig the byte[] values of the requested passwords. All byte[]s should be "zeroed" out after the use of the passwords is finished.
Throws:
NativeCallbackError

getSamlAffiliatePasswordsByName

public java.util.HashMap getSamlAffiliatePasswordsByName(java.lang.String name)
                                                  throws NativeCallbackError
Gets all passwords associated with the indicated affiliate. The passwords will exist as byte[]s mapped to their attribute name.

Parameters:
name - The name of the affiliate.
Returns:
A HashMap containig the byte[] values of the requested passwords. All byte[]s should be "zeroed" out after the use of the passwords is finished.
Throws:
NativeCallbackError

addSAMLServiceProvider

public int addSAMLServiceProvider(java.lang.String AffiliateDomain,
                                  java.util.HashMap SPinfo)
                           throws NativeCallbackError
Adds a specified SAML Service Provider. This method uses the PM API, therefore it requires a session to be already established.

Parameters:
AffiliateDomain - The name of the Affiliate Domain
SPinfo - The configuration of the Service Provider
Returns:
0 if the Service Provider was added successfully. Else negative error code from the underlying C layer
Throws:
NativeCallbackError

getIdentityProviderById

public SAMLIdentityProviderInfo getIdentityProviderById(java.lang.String providerId,
                                                        java.lang.String[] namesToGet)
                                                 throws NativeCallbackError
Gets SAMLIdentityProviderInfo class for the given provider ID.

Parameters:
providerId - The identity provider ID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getIdentityProviderByName

public SAMLIdentityProviderInfo getIdentityProviderByName(java.lang.String providerName)
                                                   throws NativeCallbackError
Gets Identity Provider configuration for a given Identity Provider. This method uses the PM API, therefore it requires a session to be already established.

Parameters:
providerName - The name of the Identity Provider.
Returns:
The Identity Provider configuration, or null in case of error or if no data is found.
Throws:
NativeCallbackError

addSAMLIdentityProvider

public int addSAMLIdentityProvider(java.util.HashMap IDPinfo)
                            throws NativeCallbackError
Adds a given SAML Identity Provider. This method uses the PM API, therefore it requires a session to be already established.

Parameters:
SPinfo - The configuration of the Identity Provider
Returns:
0 if the Service Provider was added successfully Else negative error code from the underlying C layer
Throws:
NativeCallbackError

addAssertionConsumerServicetoSP

public int addAssertionConsumerServicetoSP(java.lang.String SAMLSPOid,
                                           java.lang.String[] SAMLSPAssertionConSvcs)
                                    throws NativeCallbackError
Adds an Assertion Consumer Service to the SP. This method uses the PM API, therefore it requires a session to be already established.

Parameters:
SAMLSPOid -
SAMLSPAssertionConSvcs -
Throws:
NativeCallbackError

getIdentityProviderBySourceId

public SAMLIdentityProviderInfo getIdentityProviderBySourceId(java.lang.String sourceId,
                                                              java.lang.String[] namesToGet)
                                                       throws NativeCallbackError
Gets SAMLIdentityProviderInfo class for the specified provider source ID.

Parameters:
sourceId - The identity provider source ID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found. If the Administrator does not have permission to manage system or domain objects, the SAMLIdentityProviderInfo is returned with a single property called "NoPrivilege" - the value stored is irrelevent.
Throws:
NativeCallbackError

getIdentityProviderByOid

public SAMLIdentityProviderInfo getIdentityProviderByOid(java.lang.String oid,
                                                         java.lang.String[] namesToGet)
                                                  throws NativeCallbackError
Gets SAMLIdentityProviderInfo class for the specified provider OID.

Parameters:
oid - The provider OID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getProviderPasswordsByOid

public java.util.HashMap getProviderPasswordsByOid(java.lang.String oid)
                                            throws NativeCallbackError
Gets passwords for the specified provider OID.

Parameters:
oid - The provider OID.
Returns:
The provider's passwords in a HashMap, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getAffiliationById

public SAMLAffiliationInfo getAffiliationById(java.lang.String affiliationId,
                                              java.lang.String[] namesToGet)
                                       throws NativeCallbackError
Gets SAMLAffiliationInfo class for the specified affiliation ID.

Parameters:
affiliationId - The affiliation ID.
namesToGet - The names of the properties to get.
Returns:
The affiliation info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getAffiliationByOid

public SAMLAffiliationInfo getAffiliationByOid(java.lang.String oid,
                                               java.lang.String[] namesToGet)
                                        throws NativeCallbackError
Gets SAMLAffiliationInfo class for the specified affiliation OID.

Parameters:
oid - The affiliation OID.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getAffiliatedServiceProviders

public int getAffiliatedServiceProviders(java.lang.String affiliation,
                                         java.lang.String[] providers)
Gets an array of OIDs of Service Providers that belong to a specified SAML Affiliation.

Parameters:
affiliation - The affiliation OID
providers - The OIDs of the Service Providers (a partial list, if there are more than the size of the allocated array).
Returns:
The total number of providers (may be more than the size of the allocated array), or -1 in case of error.

getAffiliatedIdentityProviders

public int getAffiliatedIdentityProviders(java.lang.String affiliation,
                                          java.lang.String[] providers)
Gets an array of OIDs of Identity Providers that belong to a specified SAML Affiliation.

Parameters:
affiliation - The affiliation OID
providers - The OIDs of the Identity Providers (a partial list, if there are more than the size of the allocated array).
Returns:
The total number of providers (may be more than the size of the allocated array), or -1 in case of error.

getAffiliatedProviders

public int getAffiliatedProviders(java.lang.String affiliation,
                                  java.lang.String[] providers)
Gets an array of OIDs of providers that belong to a specified SAML Affiliation.

Parameters:
affiliation - The affiliation OID
providers - The OIDs of the providers (a partial list, if there are more than the size of the allocated array).
Returns:
The total number of providers (may be more than the size of the allocated array), or -1 in case of error.

getSAMLConsumerByOid

public SAMLConsumerInfo getSAMLConsumerByOid(java.lang.String oid,
                                             java.lang.String[] namesToGet)
                                      throws NativeCallbackError
Gets SAMLConsumerInfo class for the specified consumer OID.

Parameters:
oid - The identity provider OID
namesToGet - The names of the properties to get.
Returns:
The consumer info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError, - if native callGetProviderByOid() fails.
NativeCallbackError

getSAMLConsumerByID

public SAMLConsumerInfo getSAMLConsumerByID(java.lang.String providerId,
                                            java.lang.String[] namesToGet)
                                     throws NativeCallbackError
Gets SAMLConsumerInfo class for the specified producer ID.

Parameters:
providerId - The Producer's ID
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerPasswordsByID

public java.util.HashMap getSAMLConsumerPasswordsByID(java.lang.String providerId)
                                               throws NativeCallbackError
Gets SAML Consumer passwords for the specified producer ID.

Parameters:
providerId - The Producer's ID
Returns:
The provider passwords in a HashMap, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerBySrcID

public SAMLConsumerInfo getSAMLConsumerBySrcID(java.lang.String srcID,
                                               java.lang.String[] namesToGet)
                                        throws NativeCallbackError
Gets SAMLConsumerInfo class for the specified Source ID.

Parameters:
srcID - The Producer's Source ID
namesToGet - The names of the properties to get
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerPasswordsBySrcID

public java.util.HashMap getSAMLConsumerPasswordsBySrcID(java.lang.String srcID)
                                                  throws NativeCallbackError
Gets SAML Consumer passwords, for the specified Source ID.

Parameters:
srcID - The Producer's Source ID
Returns:
The provider's passwords in a HashMap, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerByIssuer

public SAMLConsumerInfo getSAMLConsumerByIssuer(java.lang.String issuer,
                                                java.lang.String[] namesToGet)
                                         throws NativeCallbackError
Gets SAMLConsumerInfo class for the given Issuer.

Parameters:
issuer - The Producer's Issuer.
namesToGet - The names of the properties to get.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerPasswordsByIssuer

public java.util.HashMap getSAMLConsumerPasswordsByIssuer(java.lang.String issuer)
                                                   throws NativeCallbackError
Gets SAML Consumer passwords, for the given Issuer.

Parameters:
issuer - The Producer's Issuer.
Returns:
The provider passwords in a HashMap, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLConsumerByParamSearchString

public SAMLConsumerInfo getSAMLConsumerByParamSearchString(java.lang.String searchStr,
                                                           java.lang.String[] namesToGet,
                                                           int nSchemeType)
                                                    throws NativeCallbackError
Gets SAMLConsumerInfo class for the given Search String.

Parameters:
searchStr - String to be searched in the Auth Scheme Param.
namesToGet - The names of the properties to get.
nSchemeType - The CONST to identify the type of auth schemes to search for.
Returns:
The provider info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError

getSAMLAffiliateByName

public SAMLAffiliateInfo getSAMLAffiliateByName(java.lang.String name,
                                                java.lang.String[] namesToGet)
                                         throws NativeCallbackError
Gets SAMLAffiliateInfo class for the specified SAML Affiliate object name.

Parameters:
name - SAML Affiliate object name
namesToGet - The names of the properties to get
Returns:
The Affiliate info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError - if native callGetAffiliateByName() fails.

getSAMLAffiliateByID

public SAMLAffiliateInfo getSAMLAffiliateByID(java.lang.String providerID,
                                              java.lang.String[] namesToGet)
                                       throws NativeCallbackError
Gets SAMLAffiliateInfo class for the specified SAML Affiliate object's consumer ID.

Parameters:
providerID - Consumer ID of SAML Affiliate object
namesToGet - The names of the properties to get
Returns:
The Affiliate info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError - if native callGetAffiliateByID() fails.

getSAMLAffiliateByProducerSourceID

public SAMLAffiliateInfo getSAMLAffiliateByProducerSourceID(java.lang.String sourceID,
                                                            java.lang.String[] namesToGet)
                                                     throws NativeCallbackError
Gets SAMLAffiliateInfo class for the given SAML Affiliate object's consumer ID.

Parameters:
sourceID - Source ID of SAML Affiliate object.
namesToGet - The names of the properties to get.
Returns:
The Affiliate info object, or null in case of error or if no data is found.
Throws:
NativeCallbackError - if native callGetAffiliateByID() fails.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

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