-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add warning about unsupported HTTP-Redirect binding for SAML 2.0 responses #17026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2e6103d
docs(saml2): clarify that HTTP-Redirect binding is not supported for …
snowykte0426 7465866
docs(saml2): migrate SAML 2.0 Migration Guide from Wiki
snowykte0426 10b5c05
docs(saml2): add SAML 2.0 Migration Guide to nav.adoc
snowykte0426 aa9e8de
docs(migration): remove redundant SAML HTTP-Redirect warning
snowykte0426 2fd071c
docs(saml2): remove unnecessary WIP note from migration guide
snowykte0426 b60b06d
docs(saml2): remove version number from Spring Security to ease maint…
snowykte0426 862f7c4
docs(saml2): add xref links for saml2Login, saml2Logout, and saml2Met…
snowykte0426 4ab9cde
docs(saml2): remove metadata section and add sample link to examples …
snowykte0426 94acb53
docs(saml2): rename migration guide and update navigation entry
snowykte0426 2388710
docs(saml2): rename migration guide and update navigation entry
snowykte0426 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
docs/modules/ROOT/pages/servlet/saml2/saml2-migration-guide.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| NOTE: This document is a work in progress. Please check back regularly for updates. | ||
jzheaux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This document contains guidance for moving SAML 2.0 Service Providers from Spring Security SAML Extensions 1.x to Spring Security 5.7.x. Since Spring Security doesn’t provide Identity Provider support, migrating a Spring Security SAML Extensions Identity Provider is out of scope for this document. | ||
jzheaux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Because the two approaches are as different as they are, this document will tend to cover patterns more than precise search-and-replace steps. | ||
|
|
||
| [[saml2-login-logout]] | ||
| == Login & Logout | ||
|
|
||
| === Changes In Approach | ||
|
|
||
| https://github.com/spring-projects/spring-security[Spring Security] takes a slightly different approach from https://github.com/spring-projects/spring-security-saml[Spring Security SAML Extensions] in a few notable ways. | ||
|
|
||
| ==== Simplified Enablement | ||
|
|
||
| Spring Security SAML Extensions support for Service Providers is provided by a series of filters enabled by adding each filter manually in the correct order to various Spring Security filter chains. | ||
|
|
||
| Spring Security’s SAML 2.0 Service Provider support is enabled via the Spring Security `saml2Login` and `saml2Logout` DSL methods. It selects the correct filters to add and puts them in the appropriate places in the filter chain. | ||
jzheaux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ==== Stronger Encapsulation | ||
|
|
||
| Like Spring Security SAML Extensions, Spring Security bases it’s SAML support on OpenSAML. The Extensions project exposes OpenSAML over public interfaces, blurring the lines between the two projects, effectively requiring OpenSAML, and making upgrades to later versions of OpenSAML more complicated. | ||
|
|
||
| Spring Security provides stronger encapsulation. No public interfaces expose OpenSAML components and any class that exposes OpenSAML in its public API is named with an `OpenSaml` prefix for additional clarity. | ||
|
|
||
| ==== Out-of-the-box Multitenancy | ||
|
|
||
| Spring Security SAML Extensions offered some lightweight support for declaring more than one Identity Provider and accessing it at login time using the `idp` request parameter. This was limiting as far as changing things at runtime was concerned and also doesn’t allow for a many-to-many relationship between relying and asserting parties. | ||
|
|
||
| Spring Security builds SAML 2.0 multitenancy into its default URLs and basic components in the form of a `RelyingPartyRegistration`. This component acts as a link between a Relying Party’s metadata and an Asserting Party’s metadata, and all pairs are available for lookup in a `RelyingPartyRegistrationRepository`. Each URL represents a unique registration pair to be retrieved. | ||
|
|
||
| Whether it’s AuthnRequests, Responses, LogoutRequests, LogoutResponses, or EntityDescriptors, each filter is based off of `RelyingPartyRegistrationRepository` and so is fundamentally multi-tenant. | ||
|
|
||
| === Examples Matrix | ||
|
|
||
| Both Spring Security and Spring Security SAML Extensions have examples for how to configure the Service Provider: | ||
|
|
||
| [options="header"] | ||
| |=== | ||
| | Use case | Spring Security | Spring Security SAML Extension | ||
|
|
||
| | Login & Logout | https://github.com/spring-projects/spring-security-samples/tree/main/servlet/spring-boot/java/saml2/login[Sample] | | ||
| https://github.com/jzheaux/spring-security-saml-migrate/tree/main/login-logout[Sample] | ||
| | Login using SAML Extension URLs | https://github.com/spring-projects/spring-security-samples/tree/main/servlet/spring-boot/java/saml2/custom-urls[Sample] | - | ||
| |=== | ||
|
|
||
| You can also see a showcase example in https://github.com/spring-projects/spring-security-saml/tree/main/sample[Spring Security SAML Extension]'s GitHub project. | ||
|
|
||
|
|
||
| [NOTE] | ||
| ==== | ||
| Spring Security does not support HTTP-Redirect binding for SAML 2.0 Responses. | ||
| According to the SAML specification, the HTTP-Redirect binding is not permitted for SAML Responses due to URL length and signature limitations. Attempting to use this binding may result in unexpected errors. | ||
| Use HTTP-POST binding instead when configuring your identity provider. | ||
| ==== | ||
|
|
||
| [[saml2-metadata]] | ||
jzheaux marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| == Metadata | ||
|
|
||
| Support for metadata is currently quite simple. Additions to its functionality are under consideration. | ||
|
|
||
| `RelyingPartyRegistrations` builds off of the existing multitenancy support and can derive multiple ``RelyingPartyRegistration``s from a single EntityDescriptor endpoint. These can then be paired with locally-configured relying party information as needed. | ||
|
|
||
| For applications that require Spring Security SAML Extension’s refreshable metadata feature, please see https://github.com/spring-projects/spring-security-samples/tree/main/servlet/spring-boot/java/saml2/refreshable-metadata[the associated Spring Security sample] for how to add. | ||
|
|
||
| [[saml2-unported]] | ||
| == Unported Features | ||
|
|
||
| There are some features that are not yet ported over and there are as yet no plans to do so: | ||
|
|
||
| * HTTP-Redirect binding for SAML 2.0 Responses | ||
| * Artifact binding support | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.