Class SAML2Config
java.lang.Object
org.forgerock.openam.sts.config.user.SAML2Config
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
Modifier and TypeClassDescriptionstatic class
Builder used to programmatically create SAML2Config objects -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a newSAML2ConfigBuilder
.boolean
Gets whether the assertion should be encrypted.boolean
Gets whether the attributes should be encrypted.boolean
Gets whether the name-id should be encrypted.boolean
static SAML2Config
Creates a SAML2Config object from aJsonValue
representationstatic SAML2Config
fromSmsJson
(JsonValue json) Creates a SAML2Config object from a SMSJsonValue
representationGets the attribute map.Gets the classname of the CustomAttributeMapper.Gets the classname of the CustomAttributeStatementsProvider.Gets the classname of the CustomAuthenticationStatementsProvider.Gets the classname of the CustomAuthNContextMapper.Gets the classname of the CustomAuthzDecisionStatementsProvider.Gets the classname of the CustomConditionsProvider.Gets the classname of the CustomSubjectProvider.Returns an empty attribute map.Gets the encryption algorithm.int
Gets the encryption algorithm strength.Gets the encryption key alias.getIdpId()
Gets the Identity Provider id.Gets the keystore filename.byte[]
Gets the keystore password.Gets the key transport algorithm.Gets the name-id format.Gets the signature key alias.byte[]
Gets the signature key password.Gets the SP ACS url.Gets the SP entity id.long
Gets the token lifetime (in seconds).int
hashCode()
static SAML2Config
marshalFromAttributeMap
(Map<String, Set<String>> smsAttributeMap) Marshals an attribute map into a SAML2ConfigMarshals the SAML2Config into an attribute mapboolean
Gets whether the assertion should be signed.toJson()
Gets theJsonValue
representation of the SAML2Config.Gets the SMSJsonValue
representation of the SAML2Config.toString()
-
Method Details
-
builder
Creates a newSAML2ConfigBuilder
.- Returns:
- a new
SAML2ConfigBuilder
.
-
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
Gets the attribute map.- Returns:
- the attribute map.
-
getCustomConditionsProviderClassName
Gets the classname of the CustomConditionsProvider.- Returns:
- the classname of the CustomConditionsProvider.
-
getCustomSubjectProviderClassName
Gets the classname of the CustomSubjectProvider.- Returns:
- the classname of the CustomSubjectProvider.
-
getCustomAuthenticationStatementsProviderClassName
Gets the classname of the CustomAuthenticationStatementsProvider.- Returns:
- the classname of the CustomAuthenticationStatementsProvider.
-
getCustomAttributeMapperClassName
Gets the classname of the CustomAttributeMapper.- Returns:
- the classname of the CustomAttributeMapper.
-
getCustomAuthNContextMapperClassName
Gets the classname of the CustomAuthNContextMapper.- Returns:
- the classname of the CustomAuthNContextMapper.
-
getCustomAttributeStatementsProviderClassName
Gets the classname of the CustomAttributeStatementsProvider.- Returns:
- the classname of the CustomAttributeStatementsProvider.
-
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
Gets the encryption algorithm.- Returns:
- the encryption algorithm.
-
getEncryptionAlgorithmStrength
public int getEncryptionAlgorithmStrength()Gets the encryption algorithm strength.- Returns:
- the encryption algorithm strength.
-
getKeyTransportAlgorithm
Gets the key transport algorithm.- Returns:
- The key transport algorithm.
-
getKeystoreFileName
Gets the keystore filename.- Returns:
- the keystore filename.
-
getKeystorePassword
public byte[] getKeystorePassword()Gets the keystore password.- Returns:
- they keystore password.
-
getSpEntityId
Gets the SP entity id.- Returns:
- the SP entity id.
-
getSpAcsUrl
Gets the SP ACS url.- Returns:
- the SP ACS url.
-
getEncryptionKeyAlias
Gets the encryption key alias.- Returns:
- the encryption key alias.
-
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
Gets the Identity Provider id.- Returns:
- the Identity Provider id.
-
toString
-
equals
-
hashCode
public int hashCode() -
toJson
Gets theJsonValue
representation of the SAML2Config.- Returns:
- The
JsonValue
representation of the SAML2Config.
-
toSmsJson
Gets the SMSJsonValue
representation of the SAML2Config.- Returns:
- The SMS
JsonValue
representation of the SAML2Config.
-
fromJson
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
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
Marshals the SAML2Config into an attribute map- Returns:
- a map containing the SAML2Config attributes.
-
marshalFromAttributeMap
Marshals an attribute map into a SAML2Config- Parameters:
smsAttributeMap
- the attribute map.- Returns:
- a SAML2Config object.
-
getEmptySMSAttributeState
Returns an empty attribute map.- Returns:
- an empty attribute map.
-