Grails 应用程序中的安全性:Acegi 或 Shiro
我正在开发一个基于 Grails 的 Web 应用程序,我需要选择这两个框架之一进行身份验证。您认为,什么标准有利于选择 Acegi,什么标准有利于选择 Apache Shiro?
i'm developing a Grails based web-application and i need to choose one of these two frameworks for authentication. In your opinion, what criterions favor the choice for Acegi and what criterions favor the choice for Apache Shiro?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我还想指出,Springsource 官方支持“Spring Security Plugin”,因此,在其他条件相同的情况下,“Spring Security 插件”对我来说是更好的选择。
I would also like to point out that Springsource officially supports the "Spring Security Plugin", so with everything else being equal, the "Spring Security Plugin" is the better choice to me.
我认为选择其中一种的最大原因是基于您的心理模型,以及哪种对您来说最有意义。这两个框架都很成熟并且已经存在多年。如果这对您很重要,两者都会得到专业支持。两者都拥有出色的工程师和充满活力的社区。我想说的是,两者都尝试一下,看看哪种对你来说“感觉”更好。
我之前在这里发布过 - 希望这会有所帮助:
Shiro 与 SpringSecurity
I think the biggest reason to choose one over the other is based on your mental model and which makes the most sense to you. Both frameworks are well established and have been around for years. Both are professionally supported if that matters to you. Both have great engineers and a vibrant community. I'd say just try both and see what 'feels' better to you.
I posted on this here before - hopefully this helps a bit:
Shiro vs. SpringSecurity
我已经尝试过这两种方法,在我看来,Acegi 更细粒度并且有更好的文档记录。它提供了很多功能:用于保护应用程序的 URL、注释或数据库请求映射,您可以获得可选的 SSO、Facebook 身份验证等。我认为 Shiro 适合较小的项目,但 Shiro 文档仍然缺乏很多东西,您必须弄清楚自己出来。所以我的感觉是,这取决于你的项目。如果根据我目前的经验来选择,我会选择 Acegi。
I have tried both, and in my oppinion Acegi is more finegrained and much better documented. It offers lots of features: URL, Annotation or Database requestmaps for securing application, you get optional SSO, Facebook authentication etc. I think Shiro is nice for smaller project, but the Shiro documentation is still lacking lots of stuff, that you have to figure out yourself. So my feeling is, that it depends on your project. If I should choose based on my current experience, I'll go for Acegi.
我曾经是 Spring Security 插件的大用户。它易于安装和运行。除了基本用户、请求映射和角色生成之外,它还提供通用注册创建。然而,最近我试图实现 Facebook Open Graph 插件并允许用户多种注册方式,但我发现很难做到(可能是因为缺乏经验)...我发现了一篇关于 facebook 集成的文章,除了它需要使用Shiro。所以,这迫使我尝试一下......我不得不说,虽然文档有点缺乏...... Shiro 非常强大。我特别喜欢的是内置的权限逻辑!极其强大。
无论如何,我很困惑,因为我可以欣赏 Spring Security 的简单性和文档的存在,但对于我的要求...... Shiro 赢了。
(顺便说一句,我发布了多个关于 Spring Security + Facebook Connect 或 Facebook Graph 插件的问题。没有一个得到回答......事实上,建议尝试使用 Shiro 或 Nimble 插件。Nimble基于 Shiro,除了从一开始就编码的所有用户、角色、权限、组维护之外,还支持您所需的几乎所有内容,因此我坚持使用 Shiro)。
I had been a big Spring Security plugin user. It is easy to install and get running. It also offers generic registration creation in addition to the base user, requestmaps and roles generation. However, recently I was trying to implement the Facebook Open Graph plugin and allow users multiple ways of registering and I found it difficult to do with (could have been because of the lack of experience) ... I found an article on facebook intergration except it required the use of Shiro. So, this forced me to try it out... I have to say, although documentation is lacking a bit... Shiro is pretty powerful. What I especially liked is the built in permissions logic! Extremely powerful.
Anyways, Im torn, because I can appreciate the simplicity and the existence of documentation for Spring Security, but for my requirements... Shiro won.
(by the way, I posted more than one question on the topic of Spring Security + Facebook Connect or Facebook Graph plugin. Not one got answered... as a matter of fact, was recommended to try using Shiro or the Nimble plugin. Nimble is based off Shiro and has support for just about everything you need in addition to all user, role, permissions, group maintenance coded from the start. Nimble was too much for my needs, so I stuck with Shiro)