We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在mall-security模块中的SecurityConfig对dynamicSecurityFilter的配置可能导致二次鉴权,主要原因可能是在该模块下的DynamicSecurityFilter进行配置时忽略了FILTER_APPLY的配置(参考FilterSecurityInterceptor类的实现),并且在SecurityConfig中重复使用了ExpressionUrlAuthorizationConfigurer配置白名单和OPTIONS请求,使得鉴权过滤器被重复配置两次,该配置问题同时导致了 #587 我的解决方案是直接让DynamicSecurityFilter继承FilterSecurityInterceptor类 然后把SecurityConfig中的addFilterBefore改成addFilterAt 简单测试了一下好像是没什么问题(因为是萌新所以就是简单测了一下,也没有过一遍完整测试流程),并且在 #587 提到的日志重复问题也没有发生,如果大佬有时间的话希望能够看看这个有没有什么问题
The text was updated successfully, but these errors were encountered:
在SpringBoot 3对应的分支dev-v3分支中,DynamicSecurityFilter类已经不再使用,使用DynamicAuthorizationManager取代了之前的鉴权逻辑,采用此种方案后已不会导致二次鉴权。
dev-v3
Sorry, something went wrong.
No branches or pull requests
在mall-security模块中的SecurityConfig对dynamicSecurityFilter的配置可能导致二次鉴权,主要原因可能是在该模块下的DynamicSecurityFilter进行配置时忽略了FILTER_APPLY的配置(参考FilterSecurityInterceptor类的实现),并且在SecurityConfig中重复使用了ExpressionUrlAuthorizationConfigurer配置白名单和OPTIONS请求,使得鉴权过滤器被重复配置两次,该配置问题同时导致了 #587
我的解决方案是直接让DynamicSecurityFilter继承FilterSecurityInterceptor类
然后把SecurityConfig中的addFilterBefore改成addFilterAt
简单测试了一下好像是没什么问题(因为是萌新所以就是简单测了一下,也没有过一遍完整测试流程),并且在 #587 提到的日志重复问题也没有发生,如果大佬有时间的话希望能够看看这个有没有什么问题
The text was updated successfully, but these errors were encountered: