Marcus Da Coregio 8ab387ee5d Upgrade to Gradle 8.3 1 year ago
..
gradle 8ab387ee5d Upgrade to Gradle 8.3 1 year ago
src b6dc5ebefc Disable SAML2 integration tests 2 years ago
README.adoc 7058a3592c Fix broken links in README 3 years ago
build.gradle 7a4ec00199 Use Spring 6 2 years ago
gradle.properties 55ea592e93 Sync gradle.properties 2 years ago
gradlew 8ab387ee5d Upgrade to Gradle 8.3 1 year ago
gradlew.bat 8ab387ee5d Upgrade to Gradle 8.3 1 year ago
settings.gradle 313dbd7a18 Add saml2-login java-configuration sample 3 years ago

README.adoc

= SAML 2.0 Login & Logout Sample

This guide provides instructions on setting up this SAML 2.0 Login & Logout sample application.
It uses https://simplesamlphp.org/[SimpleSAMLphp] as its asserting party.

The sample application uses Spring Boot and the `spring-security-saml2-service-provider`
module which is new in Spring Security 5.2.

The https://docs.spring.io/spring-security/reference/servlet/saml2/logout.html[SAML 2.0 Logout feature] is new in Spring Security 5.6.

== Goals

=== SAML 2.0 Login

`saml2Login()` provides a very simple implementation of a Service Provider that can receive a SAML 2.0 Response via the HTTP-POST and HTTP-REDIRECT bindings against the SimpleSAMLphp SAML 2.0 reference implementation.

The following features are implemented in the MVP:

1. Receive and validate a SAML 2.0 Response containing an assertion, and create a corresponding authentication in Spring Security
2. Send a SAML 2.0 AuthNRequest to an Identity Provider
3. Provide a framework for components used in SAML 2.0 authentication that can be swapped by configuration
4. Work against the SimpleSAMLphp reference implementation

=== SAML 2.0 Single Logout

`saml2Logout()` supports RP- and AP-initiated SAML 2.0 Single Logout via the HTTP-POST and HTTP-REDIRECT bindings against the SimpleSAMLphp SAML 2.0 reference implementation.

On this sample, the SAML 2.0 Logout is using the HTTP-POST binding.

You can refer to the https://docs.spring.io/spring-security/reference/servlet/saml2/logout.html[reference documentation] for more details about the RP- and AP-initiated SAML 2.0 Logout.

== Run the Sample

=== Start up the application

You should run the application war in a servlet container like Tomcat

=== Open a Browser

http://localhost:8080/

You will be redirect to the SimpleSAMLphp IDP

=== Type in your credentials

```
User: user
Password: password
```