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 inWaffleProperties.
-
-
Constructor Summary
Constructors Constructor Description WaffleAutoConfiguration(WaffleProperties properties)Instantiates a new waffle auto configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description waffle.servlet.spi.BasicSecurityFilterProviderbasicSecurityFilterProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl windowsAuthProvider)TheBasicSecurityFilterProviderthat provides Basic authentication fall back when using single-sign-on with unsupported browser.org.springframework.security.core.GrantedAuthoritydefaultGrantedAuthority()The defaultGrantedAuthoritythat is applied to all users.GrantedAuthorityFactorygrantedAuthorityFactory()The defaultGrantedAuthorityFactorythat is used.NegotiateSecurityFilterEntryPointnegotiateSecurityFilterEntryPoint(waffle.servlet.spi.SecurityFilterProviderCollection providers)TheNegotiateSecurityFilterEntryPointfor use by the Spring SecurityAuthenticationManagerwhen using single-sign-on.waffle.servlet.spi.NegotiateSecurityFilterProvidernegotiateSecurityFilterProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl windowsAuthProvider)TheNegotiateSecurityFilterProviderthat provides single-sign-on authentication using Negotiate with the configured protocols.NegotiateSecurityFilterwaffleNegotiateSecurityFilter(waffle.servlet.spi.SecurityFilterProviderCollection providers, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory)TheNegotiateSecurityFilterto be used by Spring SecurityAuthenticationManagerwhen using single-sign-on.org.springframework.boot.web.servlet.FilterRegistrationBeanwaffleNegotiateSecurityFilterRegistrationBean(NegotiateSecurityFilter filter)When using Spring Boot,Filters are automatically registered.waffle.servlet.spi.SecurityFilterProviderCollectionwaffleSecurityFilterProviderCollection(waffle.servlet.spi.NegotiateSecurityFilterProvider negotiateProvider, waffle.servlet.spi.BasicSecurityFilterProvider basicProvider)TheSecurityFilterProviderCollectionthat includesNegotiateSecurityFilterProviderand/orBasicSecurityFilterProviderdepending on configuration.WindowsAuthenticationProviderwaffleSpringAuthenticationProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl waffleWindowsAuthProvider, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory)TheWindowsAuthenticationProviderthat can be used by Spring Security by anAuthenticationManagerto provide authentication.waffle.windows.auth.impl.WindowsAuthProviderImplwaffleWindowsAuthProvider()TheWindowsAuthProviderImplinstance.
-
-
-
Constructor Detail
-
WaffleAutoConfiguration
public WaffleAutoConfiguration(WaffleProperties properties)
Instantiates a new waffle auto configuration.- Parameters:
properties- the properties
-
-
Method Detail
-
waffleWindowsAuthProvider
@Bean @ConditionalOnMissingBean public waffle.windows.auth.impl.WindowsAuthProviderImpl waffleWindowsAuthProvider()
TheWindowsAuthProviderImplinstance.- Returns:
- the windows auth provider impl
-
defaultGrantedAuthority
@Bean @ConditionalOnMissingBean(name="defaultGrantedAuthority") public org.springframework.security.core.GrantedAuthority defaultGrantedAuthority()
The defaultGrantedAuthoritythat is applied to all users. Default can be overridden by defining a bean of typeGrantedAuthoritywith name "defaultGrantedAuthority".- Returns:
- the granted authority
-
grantedAuthorityFactory
@Bean @ConditionalOnMissingBean public GrantedAuthorityFactory grantedAuthorityFactory()
The defaultGrantedAuthorityFactorythat is used. Default can be overridden by defining a bean of typeGrantedAuthorityFactory.- Returns:
- the granted authority factory
-
waffleSpringAuthenticationProvider
@Bean @ConditionalOnMissingBean public WindowsAuthenticationProvider waffleSpringAuthenticationProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl waffleWindowsAuthProvider, @Qualifier("defaultGrantedAuthority") org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory)
TheWindowsAuthenticationProviderthat can be used by Spring Security by anAuthenticationManagerto 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 waffle.servlet.spi.NegotiateSecurityFilterProvider negotiateSecurityFilterProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl windowsAuthProvider)TheNegotiateSecurityFilterProviderthat 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 waffle.servlet.spi.BasicSecurityFilterProvider basicSecurityFilterProvider(waffle.windows.auth.impl.WindowsAuthProviderImpl windowsAuthProvider)TheBasicSecurityFilterProviderthat 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 waffle.servlet.spi.SecurityFilterProviderCollection waffleSecurityFilterProviderCollection(waffle.servlet.spi.NegotiateSecurityFilterProvider negotiateProvider, waffle.servlet.spi.BasicSecurityFilterProvider basicProvider)TheSecurityFilterProviderCollectionthat includesNegotiateSecurityFilterProviderand/orBasicSecurityFilterProviderdepending 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(waffle.servlet.spi.SecurityFilterProviderCollection providers)TheNegotiateSecurityFilterEntryPointfor use by the Spring SecurityAuthenticationManagerwhen 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(waffle.servlet.spi.SecurityFilterProviderCollection providers, @Qualifier("defaultGrantedAuthority") org.springframework.security.core.GrantedAuthority defaultGrantedAuthority, GrantedAuthorityFactory grantedAuthorityFactory)TheNegotiateSecurityFilterto be used by Spring SecurityAuthenticationManagerwhen 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 waffleNegotiateSecurityFilterRegistrationBean(NegotiateSecurityFilter filter)When using Spring Boot,Filters are automatically registered. In this case, the filter must be manually configured within anAuthenticationManagerand 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
-
-