org.springframework.security.web.firewall.StrictHttpFirewall Java Examples

The following examples show how to use org.springframework.security.web.firewall.StrictHttpFirewall. 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: 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 #2
Source File: ApplicationConfiguration.java    From cerberus with Apache License 2.0 5 votes vote down vote up
/**
 * We need to accept double slashes to maintain backwards compatibility with the Highlander API
 * behavior.
 */
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
  StrictHttpFirewall firewall = new StrictHttpFirewall();
  firewall.setAllowUrlEncodedDoubleSlash(true);
  return firewall;
}
 
Example #3
Source File: SecurityConfiguration.java    From find with MIT License 5 votes vote down vote up
public static StrictHttpFirewall firewallAllowingUrlEncodedCharacters() {
    final StrictHttpFirewall firewall = new StrictHttpFirewall();

    // We use encoded IDOL field names, e.g.
    //   'api/public/parametric/numeric/buckets/NODE_PLACE%252FPLACE_POPULATION'
    // so we have to allow these fields through.
    firewall.setAllowUrlEncodedPercent(true);
    firewall.setAllowUrlEncodedPeriod(true);
    firewall.setAllowUrlEncodedSlash(true);

    return firewall;
}
 
Example #4
Source File: MySecurityConfig.java    From zfile with MIT License 4 votes vote down vote up
@Bean
public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedPercent(true);
    return firewall;
}
 
Example #5
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpFirewall defaultFireWall() {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedSlash(true);
    return firewall;
}
 
Example #6
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpFirewall defaultFireWall() {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedSlash(true);
    return firewall;
}
 
Example #7
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpFirewall defaultFireWall() {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedSlash(true);
    return firewall;
}
 
Example #8
Source File: SecurityConfiguration.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Bean
public HttpFirewall defaultFireWall() {
    StrictHttpFirewall firewall = new StrictHttpFirewall();
    firewall.setAllowUrlEncodedSlash(true);
    return firewall;
}