Class SAML2Config
- java.lang.Object
-
- org.forgerock.openam.sts.config.user.SAML2Config
-
@SupportedAll public class SAML2Config extends Object
Encapsulates the configuration state necessary to produce SAML2 assertions. Each published rest-sts instance will encapsulate state to allow it to issue saml2 assertions for a single SP. Thus the spEntityId, and spAcsUrl (the url of the SP's assertion consumer service) are specified in this class. The signatureAlias corresponds to the IDP's signing key, and the encryptionKeyAlias could correspond to the SP's public key corresponding to the key used to encrypt the symmetric key used to encrypt assertion elements.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SAML2Config.SAML2ConfigBuilder
Builder used to programmatically create SAML2Config objects
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SAML2Config.SAML2ConfigBuilder
builder()
Creates a newSAML2ConfigBuilder
.boolean
encryptAssertion()
Gets whether the assertion should be encrypted.boolean
encryptAttributes()
Gets whether the attributes should be encrypted.boolean
encryptNameID()
Gets whether the name-id should be encrypted.boolean
equals(Object other)
static SAML2Config
fromJson(JsonValue json)
Creates a SAML2Config object from aJsonValue
representationstatic SAML2Config
fromSmsJson(JsonValue json)
Creates a SAML2Config object from a SMSJsonValue
representationMap<String,String>
getAttributeMap()
Gets the attribute map.String
getCustomAttributeMapperClassName()
Gets the classname of the CustomAttributeMapper.String
getCustomAttributeStatementsProviderClassName()
Gets the classname of the CustomAttributeStatementsProvider.String
getCustomAuthenticationStatementsProviderClassName()
Gets the classname of the CustomAuthenticationStatementsProvider.String
getCustomAuthNContextMapperClassName()
Gets the classname of the CustomAuthNContextMapper.String
getCustomAuthzDecisionStatementsProviderClassName()
Gets the classname of the CustomAuthzDecisionStatementsProvider.String
getCustomConditionsProviderClassName()
Gets the classname of the CustomConditionsProvider.String
getCustomSubjectProviderClassName()
Gets the classname of the CustomSubjectProvider.static Map<String,Set<String>>
getEmptySMSAttributeState()
Returns an empty attribute map.String
getEncryptionAlgorithm()
Gets the encryption algorithm.int
getEncryptionAlgorithmStrength()
Gets the encryption algorithm strength.String
getEncryptionKeyAlias()
Gets the encryption key alias.String
getIdpId()
Gets the Identity Provider id.String
getKeystoreFileName()
Gets the keystore filename.byte[]
getKeystorePassword()
Gets the keystore password.String
getKeyTransportAlgorithm()
Gets the key transport algorithm.String
getNameIdFormat()
Gets the name-id format.String
getSignatureKeyAlias()
Gets the signature key alias.byte[]
getSignatureKeyPassword()
Gets the signature key password.String
getSpAcsUrl()
Gets the SP ACS url.String
getSpEntityId()
Gets the SP entity id.long
getTokenLifetimeInSeconds()
Gets the token lifetime (in seconds).int
hashCode()
static SAML2Config
marshalFromAttributeMap(Map<String,Set<String>> smsAttributeMap)
Marshals an attribute map into a SAML2ConfigMap<String,Set<String>>
marshalToAttributeMap()
Marshals the SAML2Config into an attribute mapboolean
signAssertion()
Gets whether the assertion should be signed.JsonValue
toJson()
Gets theJsonValue
representation of the SAML2Config.JsonValue
toSmsJson()
Gets the SMSJsonValue
representation of the SAML2Config.String
toString()
-
-
-
Method Detail
-
builder
public static SAML2Config.SAML2ConfigBuilder builder()
Creates a newSAML2ConfigBuilder
.- Returns:
- a new
SAML2ConfigBuilder
.
-
getNameIdFormat
public String getNameIdFormat()
Gets the name-id format.- Returns:
- the name-id format.
-
getTokenLifetimeInSeconds
public long getTokenLifetimeInSeconds()
Gets the token lifetime (in seconds).- Returns:
- the token lifetime.
-
getAttributeMap
public Map<String,String> getAttributeMap()
Gets the attribute map.- Returns:
- the attribute map.
-
getCustomConditionsProviderClassName
public String getCustomConditionsProviderClassName()
Gets the classname of the CustomConditionsProvider.- Returns:
- the classname of the CustomConditionsProvider.
-
getCustomSubjectProviderClassName
public String getCustomSubjectProviderClassName()
Gets the classname of the CustomSubjectProvider.- Returns:
- the classname of the CustomSubjectProvider.
-
getCustomAuthenticationStatementsProviderClassName
public String getCustomAuthenticationStatementsProviderClassName()
Gets the classname of the CustomAuthenticationStatementsProvider.- Returns:
- the classname of the CustomAuthenticationStatementsProvider.
-
getCustomAttributeMapperClassName
public String getCustomAttributeMapperClassName()
Gets the classname of the CustomAttributeMapper.- Returns:
- the classname of the CustomAttributeMapper.
-
getCustomAuthNContextMapperClassName
public String getCustomAuthNContextMapperClassName()
Gets the classname of the CustomAuthNContextMapper.- Returns:
- the classname of the CustomAuthNContextMapper.
-
getCustomAttributeStatementsProviderClassName
public String getCustomAttributeStatementsProviderClassName()
Gets the classname of the CustomAttributeStatementsProvider.- Returns:
- the classname of the CustomAttributeStatementsProvider.
-
getCustomAuthzDecisionStatementsProviderClassName
public String getCustomAuthzDecisionStatementsProviderClassName()
Gets the classname of the CustomAuthzDecisionStatementsProvider.- Returns:
- the classname of the CustomAuthzDecisionStatementsProvider.
-
signAssertion
public boolean signAssertion()
Gets whether the assertion should be signed.- Returns:
- whether the assertion should be signed.
-
encryptNameID
public boolean encryptNameID()
Gets whether the name-id should be encrypted.- Returns:
- whether the name-id should be encrypted.
-
encryptAttributes
public boolean encryptAttributes()
Gets whether the attributes should be encrypted.- Returns:
- whether the attributes should be encrypted.
-
encryptAssertion
public boolean encryptAssertion()
Gets whether the assertion should be encrypted.- Returns:
- whether the assertion should be encrypted.
-
getEncryptionAlgorithm
public String getEncryptionAlgorithm()
Gets the encryption algorithm.- Returns:
- the encryption algorithm.
-
getEncryptionAlgorithmStrength
public int getEncryptionAlgorithmStrength()
Gets the encryption algorithm strength.- Returns:
- the encryption algorithm strength.
-
getKeyTransportAlgorithm
public String getKeyTransportAlgorithm()
Gets the key transport algorithm.- Returns:
- The key transport algorithm.
-
getKeystoreFileName
public String getKeystoreFileName()
Gets the keystore filename.- Returns:
- the keystore filename.
-
getKeystorePassword
public byte[] getKeystorePassword()
Gets the keystore password.- Returns:
- they keystore password.
-
getSpEntityId
public String getSpEntityId()
Gets the SP entity id.- Returns:
- the SP entity id.
-
getSpAcsUrl
public String getSpAcsUrl()
Gets the SP ACS url.- Returns:
- the SP ACS url.
-
getEncryptionKeyAlias
public String getEncryptionKeyAlias()
Gets the encryption key alias.- Returns:
- the encryption key alias.
-
getSignatureKeyAlias
public String getSignatureKeyAlias()
Gets the signature key alias.- Returns:
- the signature key alias.
-
getSignatureKeyPassword
public byte[] getSignatureKeyPassword()
Gets the signature key password.- Returns:
- the signature key password.
-
getIdpId
public String getIdpId()
Gets the Identity Provider id.- Returns:
- the Identity Provider id.
-
toJson
public JsonValue toJson()
Gets theJsonValue
representation of the SAML2Config.- Returns:
- The
JsonValue
representation of the SAML2Config.
-
toSmsJson
public JsonValue toSmsJson()
Gets the SMSJsonValue
representation of the SAML2Config.- Returns:
- The SMS
JsonValue
representation of the SAML2Config.
-
fromJson
public static SAML2Config fromJson(JsonValue json) throws IllegalStateException
Creates a SAML2Config object from aJsonValue
representation- Parameters:
json
- theJsonValue
representation.- Returns:
- a SAML2Config object
- Throws:
IllegalStateException
- If there is an error parsing the JSON.
-
fromSmsJson
public static SAML2Config fromSmsJson(JsonValue json) throws IllegalStateException
Creates a SAML2Config object from a SMSJsonValue
representation- Parameters:
json
- the SMSJsonValue
representation.- Returns:
- a SAML2Config object
- Throws:
IllegalStateException
- If there is an error parsing the JSON.
-
marshalToAttributeMap
public Map<String,Set<String>> marshalToAttributeMap()
Marshals the SAML2Config into an attribute map- Returns:
- a map containing the SAML2Config attributes.
-
marshalFromAttributeMap
public static SAML2Config marshalFromAttributeMap(Map<String,Set<String>> smsAttributeMap)
Marshals an attribute map into a SAML2Config- Parameters:
smsAttributeMap
- the attribute map.- Returns:
- a SAML2Config object.
-
-