Package io.jmix.saml
Class SamlVaadinWebSecurity
java.lang.Object
io.jmix.securityflowui.security.AbstractFlowuiWebSecurity
io.jmix.saml.SamlVaadinWebSecurity
- Direct Known Subclasses:
SamlAutoConfiguration.DefaultSamlVaadinWebSecurity
Provides Vaadin security to the project. Configures authentication using the SAML 2.0 provider.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SamlHttpSecurityConfigurer> protected org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepositoryprotected SamlPropertiesprotected SamlUserMapper<? extends JmixSamlUserDetails> Fields inherited from class io.jmix.securityflowui.security.AbstractFlowuiWebSecurity
h2ConsoleProperties, servletContext, webProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureJmixSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http) protected voidconfigureVaadinSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http) protected org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvidercreateAuthenticationProvider(SamlUserMapper<?> samlUserMapper) protected org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepositorycreateRelyingPartyRegistrationRepositoryWrapperWithRedirectBinding(org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository originalRepository) Wraps the repository so that resolved registrations use the REDIRECT binding for single logout.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) protected org.springframework.security.saml2.provider.service.web.authentication.logout.Saml2LogoutRequestResolverCreates a resolver that generates SAML LogoutRequests for relying-party-initiated logout.protected org.springframework.security.web.authentication.logout.LogoutSuccessHandlerprotected StringMirrors the default Spring Security SAML login behavior so that Vaadin navigation access control points unauthenticated users to the same login URL.protected voidinitNavigationAccessControlLoginView(org.springframework.security.config.annotation.web.builders.HttpSecurity http, String loginView) protected booleanMethods inherited from class io.jmix.securityflowui.security.AbstractFlowuiWebSecurity
configureCustomSpecifics, jmixSecurityFilterChain
-
Field Details
-
samlUserMapper
-
relyingPartyRegistrationRepository
@Autowired protected org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository relyingPartyRegistrationRepository -
samlProperties
-
additionalConfigurers
-
-
Constructor Details
-
SamlVaadinWebSecurity
public SamlVaadinWebSecurity()
-
-
Method Details
-
configureJmixSpecifics
protected void configureJmixSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Overrides:
configureJmixSpecificsin classAbstractFlowuiWebSecurity- Throws:
Exception
-
configureVaadinSpecifics
protected void configureVaadinSpecifics(org.springframework.security.config.annotation.web.builders.HttpSecurity http) - Specified by:
configureVaadinSpecificsin classAbstractFlowuiWebSecurity
-
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. IfSamlProperties.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 thesingle-logoutURL and binding of the registration explicitly and disablejmix.saml.force-redirect-binding-logout. -
isForceRedirectBindingLogout
protected boolean isForceRedirectBindingLogout() -
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)
-