Package waffle.spring.boot
Class WaffleAutoConfiguration
java.lang.Object
waffle.spring.boot.WaffleAutoConfiguration
@Configuration
@EnableConfigurationProperties(WaffleProperties.class)
public class WaffleAutoConfiguration
extends Object
Auto configuration for Spring Boot that configures beans based on properties defined in
WaffleProperties
.-
Constructor Summary
ConstructorDescriptionWaffleAutoConfiguration
(WaffleProperties properties) Instantiates a new waffle auto configuration. -
Method Summary
Modifier and TypeMethodDescriptionbasicSecurityFilterProvider
(WindowsAuthProviderImpl windowsAuthProvider) TheBasicSecurityFilterProvider
that provides Basic authentication fall back when using single-sign-on with unsupported browser.org.springframework.security.core.GrantedAuthority
The defaultGrantedAuthority
that is applied to all users.The defaultGrantedAuthorityFactory
that is used.TheNegotiateSecurityFilterEntryPoint
for use by the Spring SecurityAuthenticationManager
when using single-sign-on.negotiateSecurityFilterProvider
(WindowsAuthProviderImpl windowsAuthProvider) TheNegotiateSecurityFilterProvider
that provides single-sign-on authentication using Negotiate with the configured protocols.waffleNegotiateSecurityFilter
(SecurityFilterProviderCollection providers, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory) TheNegotiateSecurityFilter
to be used by Spring SecurityAuthenticationManager
when using single-sign-on.org.springframework.boot.web.servlet.FilterRegistrationBean
<NegotiateSecurityFilter> When using Spring Boot,Filter
s are automatically registered.waffleSecurityFilterProviderCollection
(NegotiateSecurityFilterProvider negotiateProvider, BasicSecurityFilterProvider basicProvider) TheSecurityFilterProviderCollection
that includesNegotiateSecurityFilterProvider
and/orBasicSecurityFilterProvider
depending on configuration.waffleSpringAuthenticationProvider
(WindowsAuthProviderImpl waffleWindowsAuthProvider, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory) TheWindowsAuthenticationProvider
that can be used by Spring Security by anAuthenticationManager
to provide authentication.TheWindowsAuthProviderImpl
instance.
-
Constructor Details
-
WaffleAutoConfiguration
Instantiates a new waffle auto configuration.- Parameters:
properties
- the properties
-
-
Method Details
-
waffleWindowsAuthProvider
TheWindowsAuthProviderImpl
instance.- Returns:
- the windows auth provider impl
-
defaultGrantedAuthority
@Bean @ConditionalOnMissingBean(name="defaultGrantedAuthority") public org.springframework.security.core.GrantedAuthority defaultGrantedAuthority()The defaultGrantedAuthority
that is applied to all users. Default can be overridden by defining a bean of typeGrantedAuthority
with name "defaultGrantedAuthority".- Returns:
- the granted authority
-
grantedAuthorityFactory
The defaultGrantedAuthorityFactory
that is used. Default can be overridden by defining a bean of typeGrantedAuthorityFactory
.- Returns:
- the granted authority factory
-
waffleSpringAuthenticationProvider
@Bean @ConditionalOnMissingBean public WindowsAuthenticationProvider waffleSpringAuthenticationProvider(WindowsAuthProviderImpl waffleWindowsAuthProvider, @Qualifier("defaultGrantedAuthority") org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory) TheWindowsAuthenticationProvider
that can be used by Spring Security by anAuthenticationManager
to provide authentication.- Parameters:
waffleWindowsAuthProvider
- the waffle windows auth providerdefaultGrantedAuthority
- the default granted authoritygrantedAuthorityFactory
- the granted authority factory- Returns:
- the windows authentication provider
-
negotiateSecurityFilterProvider
@Bean @ConditionalOnProperty("waffle.sso.enabled") @ConditionalOnMissingBean public NegotiateSecurityFilterProvider negotiateSecurityFilterProvider(WindowsAuthProviderImpl windowsAuthProvider) TheNegotiateSecurityFilterProvider
that provides single-sign-on authentication using Negotiate with the configured protocols. Instantiated only when sso is enabled.- Parameters:
windowsAuthProvider
- the windows auth provider- Returns:
- the negotiate security filter provider
-
basicSecurityFilterProvider
@Bean @ConditionalOnProperty("waffle.sso.enabled") @ConditionalOnMissingBean public BasicSecurityFilterProvider basicSecurityFilterProvider(WindowsAuthProviderImpl windowsAuthProvider) TheBasicSecurityFilterProvider
that provides Basic authentication fall back when using single-sign-on with unsupported browser. Instantiated only when sso is enabled.- Parameters:
windowsAuthProvider
- the windows auth provider- Returns:
- the basic security filter provider
-
waffleSecurityFilterProviderCollection
@Bean @ConditionalOnProperty("waffle.sso.enabled") @ConditionalOnMissingBean public SecurityFilterProviderCollection waffleSecurityFilterProviderCollection(NegotiateSecurityFilterProvider negotiateProvider, BasicSecurityFilterProvider basicProvider) TheSecurityFilterProviderCollection
that includesNegotiateSecurityFilterProvider
and/orBasicSecurityFilterProvider
depending on configuration. Instantiated only when sso is enabled.- Parameters:
negotiateProvider
- the negotiate providerbasicProvider
- the basic provider- Returns:
- the security filter provider collection
-
negotiateSecurityFilterEntryPoint
@Bean @ConditionalOnProperty("waffle.sso.enabled") @ConditionalOnMissingBean public NegotiateSecurityFilterEntryPoint negotiateSecurityFilterEntryPoint(SecurityFilterProviderCollection providers) TheNegotiateSecurityFilterEntryPoint
for use by the Spring SecurityAuthenticationManager
when using single-sign-on. Instantiated only when sso is enabled.- Parameters:
providers
- the providers- Returns:
- the negotiate security filter entry point
-
waffleNegotiateSecurityFilter
@Bean @ConditionalOnProperty("waffle.sso.enabled") @ConditionalOnMissingBean public NegotiateSecurityFilter waffleNegotiateSecurityFilter(SecurityFilterProviderCollection providers, @Qualifier("defaultGrantedAuthority") org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory) TheNegotiateSecurityFilter
to be used by Spring SecurityAuthenticationManager
when using single-sign-on. Instantiated only when sso is enabled.- Parameters:
providers
- the providersdefaultGrantedAuthority
- the default granted authoritygrantedAuthorityFactory
- the granted authority factory- Returns:
- the negotiate security filter
-
waffleNegotiateSecurityFilterRegistrationBean
@Bean @ConditionalOnProperty("waffle.sso.enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean<NegotiateSecurityFilter> waffleNegotiateSecurityFilterRegistrationBean(NegotiateSecurityFilter filter) When using Spring Boot,Filter
s are automatically registered. In this case, the filter must be manually configured within anAuthenticationManager
and so we must prevent Spring Boot from registering it a second time.- Parameters:
filter
- The filter that we will be disabling from auto registration.- Returns:
- the filter registration bean
-