-
Notifications
You must be signed in to change notification settings - Fork 126
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
Unusual Behavior when Integrating with Spring Boot v2.3.3.RELEASE #501
Comments
If I'm reading the description correctly, there are up to three different issues:
(I ordered them be severity) Let's try to tackle them one by one. Can you reproduce 1. in a unit test or sample project? Something you can contribute or share? |
Absolutely! Those three points are accurate from what I'm seeing. Again, I may be using the Spring library incorrectly. Let me get a sample project set up and added here for reference. I'll try to get it added by end-of-day my time. 😊 👍 |
Okay. I was thinking I could get all the examples in one go, but the intermittent issue is really hard to get a working example. So I'm going to start with addressing point 1 (non-secure routes by default). I followed the steps outlined in the first message.
You'll notice that this sets up two instances of
Since lower values have higher priority, Also, I read your message so quickly, that I missed where you said one at a time, as well as possibly contributing a unit test where the behavior is not expected. 🙈 I may look into that route as well. |
When I set up a new Spring Boot web project using the latest version with this library (v0.25.2), all routes are unsecure by default.
Description
Initially, I had a project which overrode the default
WebSecurityConfigurerAdapter
provided by Spring. In this project, I had added this library, and had injectedSecurityProblemSupport
into my own adapter (initial thought was I had to inject it; upon seeing thatSecurityConfiguration
was already supplied, I then made attempts without injecting it). This cause very unusual problems, the biggest being intermittent freezing during start up. To separate concerns, I created a simple project, and notice even more unusual patterns happening, such as the routes being unsecure by default. In the simple project, bothSecurityConfiguration
andDefaultConfigurerAdapter
(Spring default) are initialized. If I override it and flip the order, I get the authentication errors, but no problem responses.Expected Behavior
exceptionHandling
should apply to all security configurations.WebSecurityConfigurerAdapter
) should be secure, and should return problem responses.Actual Behavior
exceptionHandling
does not apply to all security configurations.Possible Fix
Not sure. When testing with multiple
WebSecurityConfigurerAdapter
's, theHttpSecurity
instances don't follow a pattern of inheritance, which I thought this library was going for (i.e.org.zalando.problem.spring.web.autoconfigure.security.SecurityConfiguration
as lowest order, which all other instances ofWebSecurityConfigurerAdapter
would inherit the exception handling).Steps to Reproduce
Context
Trying to use this library (the Spring Boot starter) with the default auto-configuration.
Your Environment
The text was updated successfully, but these errors were encountered: