* `idpWebSsoUrl` - (required) a fixed URI value for the IDP Single Sign On endpoint where
the SP sends the `AuthNRequest` messages.
* `credentials` - A list of credentials, private keys and x509 certificates, used for
message signing, verification, encryption and decryption.
This list can contain redundant credentials to allow for easy rotation of credentials.
@ -170,6 +165,12 @@ Encryption is always done using the first `ENCRYPTION` key in the list.
@@ -170,6 +165,12 @@ Encryption is always done using the first `ENCRYPTION` key in the list.
** [2] - PrivateKey/X509Certificate{SIGNING,DECRYPTION} - The SP's first signing and decryption credential.
** [3] - PrivateKey/X509Certificate{SIGNING,DECRYPTION} - The SP's second decryption credential.
Signing is always done using the first `SIGNING` key in the list.
* `ProviderDetails#entityId` - (required) the entity ID of the Identity Provider. Always a fixed URI value or string,
no patterns allowed.
* `ProviderDetails#webSsoUrl` - (required) a fixed URI value for the IDP Single Sign On endpoint where
the SP sends the `AuthNRequest` messages.
* `ProviderDetails#signAuthNRequest` - A boolean indicating whether or not to sign the `AuthNRequest` with the SP's private key, defaults to `true`
* `ProviderDetails#binding` - A `Saml2MessageBinding` indicating what kind of binding to use for the `AuthNRequest`, whether that be `REDIRECT` or `POST`, defaults to `REDIRECT`
When an incoming message is received, signatures are always required, the system will first attempt
to validate the signature using the certificate at index [0] and only move to the second
@ -216,16 +217,68 @@ credentials must be shared with the Identity Provider
@@ -216,16 +217,68 @@ credentials must be shared with the Identity Provider
[[servlet-saml2-sp-initiated]]
==== Authentication Requests - SP Initiated Flow
To initiate an authentication from the web application, a simple redirect to
To initiate an authentication from the web application, you can redirect to:
`+{baseUrl}/saml2/authenticate/{registrationId}+`
The endpoint will generate an `AuthNRequest` by invoking the `createAuthenticationRequest` method on a
configurable factory. Just expose the `Saml2AuthenticationRequestFactory` as a bean in your configuration.
This endpoint will generate an `AuthNRequest` either as a Redirect or POST depending on your `RelyingPartyRegistration`.
[[servlet-saml2-sp-initiated-factory]]
==== Customizing the AuthNRequest
To adjust the `AuthNRequest`, you can publish an instance of `Saml2AuthenticationRequestFactory`.
For example, if you wanted to configure the `AuthNRequest` to request the IDP to send the SAML `Assertion` by REDIRECT, you could do:
[source,java]
----
public interface Saml2AuthenticationRequestFactory {