Package org.apereo.cas.web.security
Class CasWebSecurityConfigurerAdapter
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- org.apereo.cas.web.security.CasWebSecurityConfigurerAdapter
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>,org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
@Order(1000) public class CasWebSecurityConfigurerAdapter extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter implements org.springframework.beans.factory.DisposableBeanThis isCasWebSecurityConfigurerAdapter.- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENDPOINT_URL_ADMIN_FORM_LOGINEndpoint url used for admin-level form-login of endpoints.
-
Constructor Summary
Constructors Constructor Description CasWebSecurityConfigurerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)protected voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)voidconfigure(org.springframework.security.config.annotation.web.builders.WebSecurity web)Disable Spring Security configuration for protocol endpoints allowing CAS' own security configuration to handle protection of endpoints where necessary.protected voidconfigureEndpointAccess(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests, org.apereo.cas.configuration.model.core.monitor.ActuatorEndpointProperties.EndpointAccessLevel access, org.apereo.cas.configuration.model.core.monitor.ActuatorEndpointProperties properties, org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.EndpointRequestMatcher endpoint)Configure endpoint access.protected voidconfigureEndpointAccessByFormLogin(org.springframework.security.config.annotation.web.builders.HttpSecurity http)Configure endpoint access by form login.protected voidconfigureEndpointAccessForStaticResources(org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests)Configure endpoint access for static resources.protected voidconfigureEndpointAccessToDenyUndefined(org.springframework.security.config.annotation.web.builders.HttpSecurity http, org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests)Configure endpoint access to deny undefined.protected voidconfigureJaasAuthenticationProvider(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth, org.apereo.cas.configuration.model.core.monitor.JaasSecurityActuatorEndpointsMonitorProperties jaas)Configure jaas authentication provider.protected voidconfigureLdapAuthenticationProvider(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth, org.apereo.cas.configuration.model.core.monitor.LdapSecurityActuatorEndpointsMonitorProperties ldap)Configure ldap authentication provider.voiddestroy()-
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, authenticationManagerBean, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
-
-
-
Field Detail
-
ENDPOINT_URL_ADMIN_FORM_LOGIN
public static final java.lang.String ENDPOINT_URL_ADMIN_FORM_LOGIN
Endpoint url used for admin-level form-login of endpoints.- See Also:
- Constant Field Values
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
configure
public void configure(org.springframework.security.config.annotation.web.builders.WebSecurity web)
Disable Spring Security configuration for protocol endpoints allowing CAS' own security configuration to handle protection of endpoints where necessary.- Specified by:
configurein interfaceorg.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Parameters:
web- web security
-
configure
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws java.lang.Exception- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Throws:
java.lang.Exception
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Throws:
java.lang.Exception
-
configureEndpointAccessToDenyUndefined
protected void configureEndpointAccessToDenyUndefined(org.springframework.security.config.annotation.web.builders.HttpSecurity http, org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests)Configure endpoint access to deny undefined.- Parameters:
http- the httprequests- the requests
-
configureLdapAuthenticationProvider
protected void configureLdapAuthenticationProvider(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth, org.apereo.cas.configuration.model.core.monitor.LdapSecurityActuatorEndpointsMonitorProperties ldap)Configure ldap authentication provider.- Parameters:
auth- the authldap- the ldap
-
configureJaasAuthenticationProvider
protected void configureJaasAuthenticationProvider(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth, org.apereo.cas.configuration.model.core.monitor.JaasSecurityActuatorEndpointsMonitorProperties jaas) throws java.lang.ExceptionConfigure jaas authentication provider.- Parameters:
auth- the authjaas- the jaas- Throws:
java.lang.Exception- the exception
-
configureEndpointAccessForStaticResources
protected void configureEndpointAccessForStaticResources(org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests)
Configure endpoint access for static resources.- Parameters:
requests- the requests
-
configureEndpointAccessByFormLogin
protected void configureEndpointAccessByFormLogin(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.ExceptionConfigure endpoint access by form login.- Parameters:
http- the http- Throws:
java.lang.Exception- the exception
-
configureEndpointAccess
protected void configureEndpointAccess(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry requests, org.apereo.cas.configuration.model.core.monitor.ActuatorEndpointProperties.EndpointAccessLevel access, org.apereo.cas.configuration.model.core.monitor.ActuatorEndpointProperties properties, org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.EndpointRequestMatcher endpoint) throws java.lang.ExceptionConfigure endpoint access.- Parameters:
httpSecurity- the httpSecurityrequests- the requestsaccess- the accessproperties- the propertiesendpoint- the endpoint- Throws:
java.lang.Exception- the exception
-
-