Java Code Examples for org.springframework.security.config.annotation.web.builders.WebSecurity#httpFirewall()

The following examples show how to use org.springframework.security.config.annotation.web.builders.WebSecurity#httpFirewall() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringSecurityConfig.java    From pacbot with Apache License 2.0 5 votes vote down vote up
@Override
  public void configure(WebSecurity web) throws Exception {
web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
web.ignoring().antMatchers("/public/**", "/swagger-ui.html", "/api.html", "/js/swagger-oauth.js", "/images/pacman_logo.svg", "/js/swagger.js", "/js/swagger-ui.js", "/images/favicon-32x32.png", "/images/favicon-16x16.png", "/images/favicon.ico", "/swagger-resources/**", "/v2/api-docs/**", "/webjars/**",
		"/v1/auth/**", "/client-auth/**", "/user/login/**", "/auth/refresh/**", "/user/authorize/**"); 
web.ignoring().antMatchers("/imgs/**");
web.ignoring().antMatchers("/css/**"); 
web.ignoring().antMatchers("/css/font/**");
web.ignoring().antMatchers("/proxy*/**");
web.ignoring().antMatchers("/hystrix/monitor/**");
web.ignoring().antMatchers("/hystrix/**");
web.ignoring().antMatchers("/actuator/**");
web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
  }
 
Example 2
Source File: SecurityConfiguration.java    From api-layer with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void configure(WebSecurity web) {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedSlash(true);
    firewall.setAllowBackSlash(true);
    firewall.setAllowUrlEncodedPercent(true);
    firewall.setAllowUrlEncodedPeriod(true);
    firewall.setAllowSemicolon(true);
    web.httpFirewall(firewall);

    web.ignoring()
        .antMatchers(AuthController.CONTROLLER_PATH + AuthController.PUBLIC_KEYS_PATH + "/**");
}
 
Example 3
Source File: WebSecurityConfiguration.java    From cerberus with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
  super.configure(web);

  // Allow double / in URIs to support buggy Cerberus clients that worked with Highland arch.
  web.httpFirewall(allowUrlEncodedSlashHttpFirewall);
}
 
Example 4
Source File: SecurityConfig.java    From para with Apache License 2.0 5 votes vote down vote up
/**
 * Configures the unsecured public resources.
 *
 * @param web web sec object
 * @throws Exception ex
 */
@Override
public void configure(WebSecurity web) throws Exception {
	web.ignoring().requestMatchers(IgnoredRequestMatcher.INSTANCE);
	DefaultHttpFirewall firewall = new DefaultHttpFirewall();
	firewall.setAllowUrlEncodedSlash(true);
	web.httpFirewall(firewall);
	//web.debug(true);
}
 
Example 5
Source File: MySecurityConfig.java    From zfile with MIT License 4 votes vote down vote up
@Override
public void configure(WebSecurity web) {
    // 对于在 header 里面增加 token 等类似情况,放行所有 OPTIONS 请求。
    web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
    web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
}
 
Example 6
Source File: SpringSecurityConfig.java    From pacbot with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
	web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
	web.ignoring().antMatchers(AUTH_WHITELIST);
	web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}
 
Example 7
Source File: SpringSecurityConfig.java    From pacbot with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
	web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
	web.ignoring().antMatchers(AUTH_WHITELIST);
	web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}
 
Example 8
Source File: SpringSecurityConfig.java    From pacbot with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
	web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
	web.ignoring().antMatchers(AUTH_WHITELIST);
	web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}
 
Example 9
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
    web.httpFirewall(defaultFireWall());
    super.configure(web);
}
 
Example 10
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
    web.httpFirewall(defaultFireWall());
    super.configure(web);
}
 
Example 11
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
    web.httpFirewall(defaultFireWall());
    super.configure(web);
}
 
Example 12
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
    web.httpFirewall(defaultFireWall());
    super.configure(web);
}
 
Example 13
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(WebSecurity web) throws Exception {
    web.httpFirewall(defaultFireWall());
    super.configure(web);
}
 
Example 14
Source File: WebSecurityContext.java    From syncope with Apache License 2.0 4 votes vote down vote up
@Override
public void configure(final WebSecurity web) {
    web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
}