Class SecurityConfig
java.lang.Object
de.ikor.sip.foundation.security.config.SecurityConfig
Central place of all configs related for spring-security settings regarding the sip
authentication features
-
Constructor Summary
ConstructorDescriptionSecurityConfig
(Optional<List<SIPAuthenticationProvider<?>>> authProviders, SecurityConfigProperties config, Optional<TokenExtractors> tokenExtractors) Autowired constructor for creating SIP Security Configuration -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AuthenticationManager
Register custom authenticationManager as a @Beanorg.springframework.security.web.SecurityFilterChain
sipDefaultSecurityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity http) org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer
Set globally ignored endpoints from config
-
Constructor Details
-
SecurityConfig
@Autowired public SecurityConfig(Optional<List<SIPAuthenticationProvider<?>>> authProviders, SecurityConfigProperties config, Optional<TokenExtractors> tokenExtractors) Autowired constructor for creating SIP Security Configuration- Parameters:
authProviders
- (optional) list of auth providers defined in the configconfig
- SIP Security configtokenExtractors
- (optional) registered token extractors filled by authProviders
-
-
Method Details
-
authenticationManagerBean
@Bean public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws SIPFrameworkExceptionRegister custom authenticationManager as a @Bean- Returns:
- Spring's Authentication Manager
- Throws:
SIPFrameworkException
- due to misconfiguration
-
sipDefaultSecurityFilterChain
@Bean public org.springframework.security.web.SecurityFilterChain sipDefaultSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Parameters:
http
- Spring provided http security object used for configuring rules- Returns:
- Spring's SecurityFilterChain
- Throws:
Exception
- if security isn't properly configured
-
sipDefaultWebSecurityCustomizer
@Bean public org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer sipDefaultWebSecurityCustomizer()Set globally ignored endpoints from config- Returns:
- Spring WebSecurityCustomizer
-