docs: deprecate SSO Kit and add a Spring Security migration guide - #5950
Conversation
SSO Kit isn't available in Vaadin 26, so every application using it has to move to Spring Security's OpenID Connect support before upgrading. There was no documentation for that move. Marks every SSO Kit page as deprecated using the same banner and admonition pattern as the other deprecated tools, and adds a migration guide that maps each kit feature to its replacement, gives the security configuration that replaces the auto-configuration, and documents the features that have no drop-in replacement.
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5950.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 28c81f7 |
Uses the future tense "won't be available in Vaadin 26" throughout, since Vaadin 26 doesn't exist yet, and states the deprecation in the landing page description as well as the meta description so it shows in navigation and in search results. Also labels the SSO Kit card on the tools overview page as deprecated and mentions that its features are now in Spring Security, so the signal is visible before anyone opens the section.
The Hilla Lit client section asserted that Hilla with Lit is discontinued, which isn't documented anywhere. Replaces it with what the Upgrading Guide actually says: the router Hilla Lit views use is deprecated and no longer actively maintained, and moving Lit views to React is the recommendation.
…ions vaadin/flow#25625 adds UidlExpiredSessionStrategy and makes VaadinSecurityConfigurer install it by default, and vaadin/flow#25627 adds KeycloakOidcUserMapper behind a keycloakRoleMapping() opt-in. Both were ported from SSO Kit, so two of the migration gaps close. Moves the two features out of the gaps section and into the migration steps that need them, with a since badge for the version they arrive in and the previous manual approach kept in a note for earlier versions. Updates the feature mapping table and the checklist to match.
|
@totally-not-ai take a look into these comments and fix where you think it makes sense. Content gaps
Code
Nit
|
- Note that the starter's SessionRegistry bean disappears with it, so an application that injects one fails to start after Step 1. - Add the legacy dev.hilla and @hilla names to the searches, and the deprecated auto-configure property to the mapping table. - Document protectRoutes() from @vaadin/hilla-react-auth for applications with a hand-written route list, so route protection no longer implies a move to file-based routing. - Separate UserLogoutEvent from SessionDestroyEvent, which also fires on logout and timeout. - State that Vaadin Router is removed in Vaadin 26, so a Lit auth context written now lasts one release. - Fix the code: @nonnull on the UserInfo record, an OidcSessionRegistry bean and a single handler instance in the logout example, and imports in the three snippets that lacked them.
Name the second starter bean for what it is, an OidcUserService, and drop the sessionConcurrency() escape hatch: Spring Security takes a SessionRegistry bean when one exists but otherwise keeps its instance in the filter chain, so it never satisfies an injection point. Keep name and email nullable in the UserInfo record, since both claims are optional in OpenID Connect; only roles needs the annotations.
|
@mshabarov Went through the list; all of it landed except one point, where the underlying claim didn't hold up. Details per item: 3. Lit deadline. The paragraph now says outright that 4. protectRoutes(). Added as a first-class option: 5. Lost beans. "Before Migrating" now warns that 6. auto-configure. Added to the mapping table, but not as "those apps migrate trivially": the property has been deprecated and without effect since SSO Kit 2.1 -- 7. Legacy names. "Scope the Work" now also lists the pre-Vaadin-24.4 names: 8. UserLogoutEvent. No longer presented as equivalent. A new entry under "Smaller Differences" explains that the kit's event comes only from its back-channel logout filter, while 9. UserInfoService. 10. Logout notification snippet. Rewritten so it compiles: an explicit 11. Imports. Added to the three snippets that lacked them: 12. Order. |
|
Check that this is up to date with especially vaadin/flow#25627 and vaadin/flow#25625, both since 25.4 |
|
@Artur- Checked both against the merged code in vaadin/flow#25625 (expired session handling) was already covered and still matches: Step 5 says vaadin/flow#25627 (Keycloak role mapping) was covered as
Both features are marked [since:com.vaadin:vaadin@V25.4] on the page, matching the release they merged for. |
…g-security-migration-guide
main now documents the feature in the OAuth2 Authentication page, with an anchor of its own. Step 6 no longer repeats what the switch grants, why it needs an OAuth2 login page, or how to install the mapper on a user service the application builds itself, and links that section instead, so the two can't drift apart. What stays is the part that belongs to a migration: the property this replaces, and the two behaviour differences from the kit's own mapper. Also fixes three style checks in text added earlier on the branch: a spelling error, an undefined abbreviation, and a cliche.
) (CP: v25.3) (#6129) Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com> Co-authored-by: Artur Signell <artur@vaadin.com>
Summary
SSO Kit won't be available in Vaadin 26, so every application using it has to move to Spring Security's OpenID Connect support first. This marks all SSO Kit pages as deprecated and adds a guide that explains how to make that move.
What changed
Documentation only. No code, no behavior change — but the pages themselves now tell readers that SSO Kit is deprecated, so anyone browsing the SSO Kit docs sees the new warning.
Deprecation marked on every SSO Kit page. Each page gets the same caution banner, a
[deprecated:com.vaadin:vaadin@V25.3]title badge, and a shared admonition included fromsso/index.adoc. The landing page description and meta description now state the deprecation, so it shows up in navigation and in search results. On the tools overview page, the SSO Kit card is labelled deprecated and points at Spring Security.New guide: Migrating to Spring Security (
articles/tools/sso/migrating-to-spring-security.adoc). It covers:AuthenticationContextis Vaadin Flow API, not SSO Kit, so views need no change.dev.hillaand@hillanames.vaadin.sso.*property to its replacement.@vaadin/hilla-react-auth, and protect routes withViewConfigorprotectRoutes().The guide uses
[since]badges for the two features ported from SSO Kit into Flow in V25.3 (VaadinExpiredSessionStrategyandKeycloakOidcUserMapper), and keeps the manual approach in a note for earlier versions.One warning the guide calls out: the starter also contributes a
SessionRegistrybean. An application that injects one fails to start once the dependency is removed, so it has to declare its own.