Spring NTLM NtlmProcessingFilter 做缓存
是否有人尝试对 spring-ntlm NtlmProcessingFilter.java 文件进行缓存,以便每个请求都不需要从 Microsoft Active Directory 查询来验证用户身份?如何使用ehcache实现这样的缓存
does anyone tried doing cache for spring-ntlm NtlmProcessingFilter.java file so that every request no need to query from microsoft active directory to authenticate user ? how to implement such cache using ehcache
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不能直接帮助你,但我的一些经验可能有用。我有一个使用修改后的 jcifs ntlm 过滤器的应用程序。 (请注意,现有的过滤器实际上并不安全!)我的修改之一是,一旦用户通过身份验证,结果将存储在会话中(而不是专门存储在缓存中)。
在执行整个 ntlm 协议之前,过滤器会检查会话中是否有身份验证结果。如果有的话,那就不用费心了。
您唯一需要注意的是 HTTP Posts。不管服务器是否要求,Internet Explorer 都要求帖子经历整个身份验证过程。所以你必须在你的过滤器中注意这一点。
I can't help you directly, but some of my experience may be useful. I have an application that uses a modified jcifs ntlm filter. (Beware that the existing filter is not actually secure!) One of my modifications is that once the user is authenticated, the results are stored in the session (not specifically in the cache).
The filter checks to see if there's an authentication result in the session before doing the whole ntlm protocol. If there is, then it doesn't need to bother.
The only thing you need to be careful about is HTTP Posts. Internet Explorer requires that Posts go through the whole authentication process anyway, whether or not the server asks for it. So you have to take care of that in your filter.