You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide provides instructions on setting up the new Spring Security SAML 2.0 support using the endpoint URLs from the EOLd Spring Security SAML Extension.
3
+
This guide provides instructions on setting up the new Spring Security SAML 2.0 support using the endpoint URLs from the EOL'd Spring Security SAML Extension.
4
4
5
-
See the https://github.com/spring-projects/spring-security/wiki/SAML-2.0-Migration-Guide[SAML 2.0 Migration Guide] for more details about the migration.
5
+
See the https://github.com/spring-projects/spring-security/wiki/SAML-2.0-Migration-Guide[SAML 2.0 Migration Guide] for more details about migrating.
6
+
7
+
== Run the Sample
8
+
9
+
=== Install Docker
10
+
11
+
This sample requires Docker to run a local IdP.
12
+
As an alternative, you can point the sample at your own IdP by changing the `application.yml` here:
There are two important differences in the way this sample is configured in order to support the Extension URIs:
46
+
47
+
* A custom URL forwarding filter
48
+
* Changes to `application.yml`
49
+
9
50
=== URL Forwarding Filter
10
51
11
-
Instead of customizing the default Spring Security configuration, a new `Filter` has been created named `SamlExtensionUrlForwardingFilter`.
12
-
This new filter is responsible to forward from the SAML Extension URLs to the new https://docs.spring.io/spring-security/reference/servlet/saml2/login/overview.html[Spring Security SAML 2.0 support URLs].
13
-
Below is a table with the URLs that the Filter listen to (column 1) and forwards to (column 2).
52
+
In this sample, you will see a forwarding `Filter` that maps SAML Extension URLs to Spring Security URLs.
53
+
This is a simple pattern you can follow to assist with migration so that as you transition from the Extension to Spring Security, you don't need to reconfigure the Identity Providers that you are connected to.
54
+
55
+
The filter is called `SamlExtensionUrlForwardingFilter` and is an example of what you can create for yourself in your own project.
56
+
It maps to Spring Security URLs in the following way:
14
57
15
58
16
59
|===
17
60
|SAML Extension URLs |Spring Security SAML 2.0 Support URLs |Description
18
61
19
62
|`/saml/SSO`
20
-
|`/login/saml2/sso/one`
63
+
|`/login/saml2/sso`
21
64
|The URL that processes a `<saml2:Response>` from the IdP
22
65
23
66
|`/saml/login`
@@ -33,11 +76,11 @@ Below is a table with the URLs that the Filter listen to (column 1) and forwards
33
76
|The URL that processes a `<saml2:LogoutRequest>` from the IdP
34
77
35
78
|`/saml/metadata`
36
-
|`/saml2/service-provider-metadata/one`
79
+
|`/saml2/metadata`
37
80
|The URL that generates the SP metadata
38
81
|===
39
82
40
-
Note that the `SamlExtensionUrlForwardingFilter` has an order of `-101`, this makes it be invoked before the `FilterChainProxy`.
83
+
Note that the `SamlExtensionUrlForwardingFilter` has an order of `-101` so it's invoked before the `FilterChainProxy`:
@@ -80,24 +120,3 @@ Since we are forwarding from one URL to another, we should also register it for
80
120
==== `RelyingPartyRegistration` properties
81
121
82
122
The `RelyingPartyRegistration` properties should also be customized to match the values that were used by the SAML Extension (see <2>, <3> and <4> above).
Copy file name to clipboardExpand all lines: servlet/spring-boot/java/saml2/saml-extension-urls/src/integTest/java/example/SamlExtensionUrlsApplicationITests.java
Copy file name to clipboardExpand all lines: servlet/spring-boot/java/saml2/saml-extension-urls/src/main/java/example/SamlExtensionUrlForwardingFilter.java
Copy file name to clipboardExpand all lines: servlet/spring-boot/java/saml2/saml-extension-urls/src/main/java/example/SamlExtensionUrlsApplication.java
0 commit comments