Package io.jmix.saml

Class SamlVaadinWebSecurity

Direct Known Subclasses:
SamlAutoConfiguration.DefaultSamlVaadinWebSecurity

public class SamlVaadinWebSecurity extends AbstractFlowuiWebSecurity
Provides Vaadin security to the project. Configures authentication using the SAML 2.0 provider.
  • Field Details

    • samlUserMapper

      @Autowired protected SamlUserMapper<? extends JmixSamlUserDetails> samlUserMapper
    • relyingPartyRegistrationRepository

      @Autowired protected org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository relyingPartyRegistrationRepository
    • samlProperties

      @Autowired protected SamlProperties samlProperties
    • additionalConfigurers

      @Autowired(required=false) protected List<SamlHttpSecurityConfigurer> additionalConfigurers
  • Constructor Details

    • SamlVaadinWebSecurity

      public SamlVaadinWebSecurity()
  • Method Details

    • configureJmixSpecifics

      protected void configureJmixSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Overrides:
      configureJmixSpecifics in class AbstractFlowuiWebSecurity
      Throws:
      Exception
    • configureVaadinSpecifics

      protected void configureVaadinSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
      Specified by:
      configureVaadinSpecifics in class AbstractFlowuiWebSecurity
    • getSamlLoginUrl

      protected String getSamlLoginUrl()
      Mirrors the default Spring Security SAML login behavior so that Vaadin navigation access control points unauthenticated users to the same login URL.
    • createAuthenticationProvider

      protected org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider createAuthenticationProvider(SamlUserMapper<?> samlUserMapper)
    • createSamlLogoutRequestResolver

      protected org.springframework.security.saml2.provider.service.web.authentication.logout.Saml2LogoutRequestResolver createSamlLogoutRequestResolver()
      Creates a resolver that generates SAML LogoutRequests for relying-party-initiated logout. If SamlProperties.isForceRedirectBindingLogout() is enabled, the logout binding is overridden to REDIRECT because it is the only binding that can be delivered from a Vaadin UI request (the POST binding requires rendering an HTML page which is not possible in a UIDL response).
    • createSamlLogoutSuccessHandler

      protected org.springframework.security.web.authentication.logout.LogoutSuccessHandler createSamlLogoutSuccessHandler()
    • createRelyingPartyRegistrationRepositoryWrapperWithRedirectBinding

      protected org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository createRelyingPartyRegistrationRepositoryWrapperWithRedirectBinding(org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository originalRepository)
      Wraps the repository so that resolved registrations use the REDIRECT binding for single logout. The SingleLogoutService location is kept as is, which is correct for identity providers declaring both bindings on the same URL (e.g. Keycloak). If the identity provider uses a separate URL for the redirect binding, configure the single-logout URL and binding of the registration explicitly and disable jmix.saml.force-redirect-binding-logout.
    • isForceRedirectBindingLogout

      protected boolean isForceRedirectBindingLogout()
    • initNavigationAccessControlLoginView

      protected void initNavigationAccessControlLoginView(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String loginView)
    • createSamlAuthConverter

      protected org.springframework.core.convert.converter.Converter<org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken,? extends org.springframework.security.authentication.AbstractAuthenticationToken> createSamlAuthConverter(SamlUserMapper<?> samlUserMapper)