Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant default security when spring-security-core in the classpath [SWF-1753] #928

Closed
spring-operator opened this issue May 2, 2022 · 2 comments
Assignees
Labels
in: integration status: invalid An issue that we don't feel is valid

Comments

@spring-operator
Copy link
Contributor

IlyaOkonechnikov opened SWF-1753 and commented

We decided to implement separate security lib in our project. It will be shared among loads of our services. We created an @EnableApiKeyAuth annotation that imports our custom security config which implies the protection of all requests via a specific header. However, if we are going to use our library, but don't want to put this annotation in the application class, the default authentication will be enabled because of the presence of the spring-security-core in our lib's classpath. The obvious way to fix it is to exclude SecurityAutoConfiguration, but it's inconvenient since we are obliged to do that in every service where we don't want to use the aforementioned annotation. I implemented the so-called DefaultSecurityConfiguration in our security lib that is enabled only if there is no WebSecurityConfigurerAdapter in the application context. I suggest that this behavior is quite irrational. Could you fix it in the nearest time, please?


Affects: 2.5.1

Attachments:

@spring-operator
Copy link
Contributor Author

IlyaOkonechnikov commented

spring-boot version: 2.6.6

spring-security-core version: 5.6.2

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

This is not related to Spring Web Flow. The Spring Security project is located here https://github.com/spring-projects/spring-security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: integration status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

2 participants