Skip to content

EnableMethodSecurity should publish only one bean of each AuthorizationAdvisor #15592

Closed
@jzheaux

Description

@jzheaux

@EnableMethodSecurity, and more specifically MethodSecurityAdvisorRegistrar registers each Spring Security method interceptor separately as an advisor. Currently, though, it duplicates the bean definition of each one, causing two instances of each AuthorizationAdvisor in the application context.

This causes some unexpected behavior for beans that would like to depend on the list of AuthorizationAdvisor instances, for example in the case of AuthorizationProxyConfiguration.

Metadata

Metadata

Assignees

Labels

in: configAn issue in spring-security-configtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions