-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Provide guide for migrating from FilterSecurityInterceptor to AuthorizationFilter #11337
Comments
@rwinch, I think that most of them should be added to I'm not sure about I've created #11360 where I have an initial list, we can discuss anything else that needs adding over there. Also, I realize that |
What's the migration path for security configurations that used |
Thanks, @vpavic, for asking. I don't believe there is one, yet. Will you please open a ticket to make sure it gets addressed? |
After taking a closer look, I'm not sure that the direct replacement is needed (or possible). This is based on the observation that Seems to me like the replacement is to use Can you confirm? |
@vpavic, I just reached out to @marcusdacoregio to confirm and yes, |
Thanks for the confirmation. Since my last comment I updated spring-projects/spring-boot#31255 and everything builds cleanly now. In the end, the changes in that PR are quite straightforward thanks to the changes made in Spring Security in response to this issue so thanks for that. |
- Added step to declare the 5.8 default in case later preparation steps cannot be taken yet Issue gh-11337
- Add instruction to declare 5.8 defaults Issue gh-11337
- Revert steps removed since implicitly included in preparation guide Issue gh-11337
Hi @JohnZ1385, the guide was restructured after the comment above. See https://docs.spring.io/spring-security/reference/5.8/migration/servlet/authorization.html#_use_authorizationmanager_for_request_security instead. |
We are in the process of migrating from Spring Boot 2.7 to Spring Boot 3.1 and this was one of the issues that we were hit with. We are using the The Line 236 in 5828e4e
The newly proposed solution is not doing that. This might be linked to #13435 where the default |
After learning about the new authorization configuration support in
HttpSecurity::authorizeHttpRequests
and seeing the docs stating thatAuthorizationFilter
is intended to supersede theFilterSecurityInterceptor
, I've opened the PR against Spring Boot (with 3.0 being a natural target for such a change) to initiate the migration to the new configuration support:However, the migration wasn't as trivial as one would expect looking at the docs (for example, no apparent direct replacements for
#anonymous
or#fullyAuthenticated
) and I haven't found any migration guide available either in the reference docs or in the Wiki here on GitHub.So, IMO it would be a good idea to provide such a migration guide.
Here's a list of use cases that should inform the contents of such a guide:
authorizeRequests
vsauthorizeHttpRequests
filterSecurityInterceptorObserveOncePerRequest
vsshouldFilterForAllDispatcherTypes
accessDecisionManager
vsauthorizationManager
RunAsManager
adaptationAccessDecisionManager
adaptationExpressionHandler
configuration@EnableGlobalMethodSecurity
vs@EnableMethodSecurity
AbstractSecurityWebSocketMessageBrokerConfigurer
vs@EnableWebSocketSecurity
The text was updated successfully, but these errors were encountered: