<activeSimpleKey>
<name>sp-signing-key</name>
<privateKey>
<t:clearValue>"primary key"</t:clearValue>
</privateKey>
<passphrase>
<t:clearValue>"password"</t:clearValue>
</passphrase>
<certificate>
<t:clearValue>"certificate"</t:clearValue>
</certificate>
</activeSimpleKey>
Module saml2
SAML2 authentication module supports authentication via Identity provider with SAML2. SAML2 module has a little complicated configuration. This module contains specific attribute:
Name | Description | Required | Type |
---|---|---|---|
|
Basic configuration of SP. |
true |
AuthenticationModuleSaml2ServiceProviderType |
AuthenticationModuleSaml2ServiceProviderType
AuthenticationModuleSaml2ServiceProviderType contains following configuration attributes:
Name | Description | Required | Type | Default | Unused from 4.4 |
---|---|---|---|---|---|
|
Unique identifier of the service provider. |
true |
String |
||
|
Unique alias used to identify the selected local service provider based on used URL. |
false |
String |
||
|
Alias used for AssertionConsumerServiceURL. |
false |
String |
||
|
Default signing algorithm. Possible values are RSA_SHA1, RSA_SHA256, RSA_SHA512 and RSA_RIPEMD160. |
false |
enum |
RSA_SHA256 |
|
|
Flag indicating whether this service signs authentication requests. |
false |
boolean |
false |
|
|
Key used by service provider. |
false |
AuthenticationModuleSaml2KeyType |
||
|
Possible identity providers for this service provider. |
true |
AuthenticationModuleSaml2ProviderType |
AuthenticationModuleSaml2KeyType
AuthenticationModuleSaml2KeyType contains following configuration attributes:
Name | Description | Required | Type |
---|---|---|---|
|
Base key used for signing and dencryption. You can use only one from active keys, or can be both null. |
true |
ModuleSaml2SimpleKeyType |
|
Base key used for signing and dencryption. You can use only one from active keys, or can be both null. |
true |
ModuleSaml2KeyStoreKeyType |
|
Other keys. |
true |
ModuleSaml2SimpleKeyType |
|
Other keys. |
true |
ModuleSaml2KeyStoreKeyType |
ModuleSaml2SimpleKeyType
ModuleSaml2SimpleKeyType contains following attributes:
Name | Description | Required | Type |
---|---|---|---|
|
Private key. |
true |
ProtectedStringType |
|
Password. |
true |
ProtectedStringType |
|
Certificate of key. |
true |
ProtectedStringType |
|
Type of key. Possible values are SIGNING, UNSPECIFIED and DECRYPTION. |
false |
enum |
ModuleSaml2KeyStoreKeyType
ModuleSaml2KeyStoreKeyType contains following attributes:
Name | Description | Required | Type |
---|---|---|---|
|
Path to KeyStore. |
true |
String |
|
Password of KeyStore. |
true |
ProtectedStringType |
|
Alias of private key in KeyStore. |
true |
ProtectedStringType |
|
Password of private key with alias ‘keyAlias’ in KeyStore. |
true |
ProtectedStringType |
|
Type of key. Possible values are SIGNING, UNSPECIFIED and DECRYPTION. |
false |
enum |
<activeKeyStoreKey>
<keyStorePath>/home/lskublik/keyStore</keyStorePath>
<keyStorePassword>
<t:clearValue>"password of keyStore"</t:clearValue>
</keyStorePassword>
<keyAlias>sp-signing-key-1</keyAlias>
<keyPassword>
<t:clearValue>"password of private key"</t:clearValue>
</keyPassword>
</activeKeyStoreKey>
AuthenticationModuleSaml2ProviderType
AuthenticationModuleSaml2ProviderType represents one Identity Providers. AuthenticationModuleSaml2ProviderType contains following attributes:
Name | Description | Required | Type | Default |
---|---|---|---|---|
|
Unique identifier of the service provider. |
true |
String |
|
|
Metadata of Identity provider. |
true |
AuthenticationModuleSaml2MetadataType |
|
|
User friendly name of provider. |
false |
String |
|
|
SAML2 binding used for authentication request. |
true |
String |
|
|
false |
ProtectedStringType |
||
|
Name of attribute in response, which value define name of user in Midpoint. For example 'uid'. |
true |
String |
AuthenticationModuleSaml2ProviderMetadataType
AuthenticationModuleSaml2ProviderMetadataType represents metadata of provider. You can choose from one definition for metadata: metadataUrl, xml and pathToFile.
Name | Description |
---|---|
|
URL, which show metadata. |
|
Xml of metadata encrypted by base64. |
|
Path to xml file, which contains metadata. |
<saml2>
<identifier>mySamlSso</identifier>
<description>My internal enterprise SAML-based SSO system.</description>
<serviceProvider>
<entityId>sp_midpoint</entityId>
<signRequests>true</signRequests>
<keys>
.
.
.
</keys>
<identityProvider>
<entityId>https://idptestbed/idp/shibboleth</entityId>
<metadata>
<xml>PD94bWwgdmVyc2lvbj0iMS4wI...</xml>
</metadata>
<linkText>Shibboleth</linkText>
<authenticationRequestBinding>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST</authenticationRequestBinding>
<nameOfUsernameAttribute>uid</nameOfUsernameAttribute>
</identityProvider>
</serviceProvider>
</saml2>
Generation of service provider metadata
Midpoint can generate metadata of SP. You can get it via link http://<midpointHost>/midpoint/auth/<authenticationSequenceUrlSuffix>/<saml2ModuleName>/metadata/<registrationId>. RegistrationId is 'aliasForPath', when is provided, or 'alias', when is provided, or 'entityId' of SP.
Generation of metadata works only if your sequence use only saml2 authentication module or saml2 authentication module is first in chain of your sequence. When you want to use a chain and saml2 module won’t be first authentication module, we recommend to create sequence only with saml module, generate metadata and then add other modules.
If Midpoint is located behind a reverse proxy it may be useful to set the publicHttpUrlPattern setting to the right value in order for the SAML endpoints (in the SP Metadata and in the SAMLRequest) to reflect the right URLs (see below)
<systemConfiguration>
.
.
.
<infrastructure>
<publicHttpUrlPattern>https://public.url.local/midpoint</publicHttpUrlPattern>
</infrastructure>
.
.
.
</systemConfiguration>
Migration Saml2 authentication module from 4.3
Dependency for support of saml2
authentication module was changed to Spring Security saml2-service-provider.
-
Functionality of a new module is equivalent to the functionality of old
saml2
module, however some configuration properties are not available in the new module. Such properties were tagged as deprecated in schema of saml2 authentication module. -
Attribute 'provider' has to be changed to 'identityProvider' in 'serviceProvider'.
-
When keys of 'type' ENCRYPTION are used, they need to be removed. Service provider will obtain them from metadata for identity provider.