Skip to content

Multiple WebSecurityConfigurationAdapter ignoring() method affects other configurations #4222

@sofiageo

Description

@sofiageo

Summary

Using ignoring() method with multiple WebSecurityConfigurationAdapter affects both adapters.

Actual Behavior

Ignoring a URL pattern inside a configure(WebSecurity web) method, ignores the same URL pattern in another web security configuration. (I'm using the guide from section 5.7 in the docs)

Expected Behavior

I'm not sure what is the expected behaviour. Maybe there is a reason that it works like that. I would expect it would only affect the configuration it is defined in, like for example debug() method.

Configuration

Config 1:

    @Override
    protected void configure(HttpSecurity httpSecurity) throws Exception {
      httpSecurity
              .antMatcher("/restapi/**")
    //more httpSecurity configurations - removed to make example more readable
    }

Config 2:

    @Override
    public void configure(WebSecurity web) throws Exception {
      web
              .debug(true)
              .ignoring().antMatchers("/restapi/**");
    }

Version

I'm using 4.2.1.RELEASE. Haven't tested this in other versions.

Sample

Metadata

Metadata

Assignees

Labels

status: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions