Java authorization library like "CanCan" for Ruby on Rails
Asked Answered
P

3

6

Everyone I was wondering if anyone knows of any Java libraries that are similar to or offer the same functionality as CanCan (Ruby on Rails). Would love to know your experiences with them if any.

CanCan is an authorization library for Ruby on Rails which restricts what resources a given user is allowed to access. All permissions are defined in a single location (the Ability class) and not duplicated across controllers, views, and database queries.

Bonus points if it works on the play framework (http://playframework.org)

Puca answered 13/6, 2011 at 8:24 Comment(0)
P
3

Here is one Example https://github.com/eltados/canny of something very similar? Has anyone got any experience using this?

Puca answered 13/6, 2011 at 9:34 Comment(0)
L
3

Checkout this lib:

https://casbin.org/

https://github.com/casbin/jcasbin

You can use a library in your application. Also, you can deploy it as a service and integrate your application to it.

Lempres answered 12/10, 2020 at 7:57 Comment(2)
Thanks for your answer, I asked this question 9 years ago, but its good to see options to help anyone else who has the same query, Thanks again.Puca
Casbin is an interesting solution.Suchta
J
2

Does Spring Security not provide similar functionality? See http://static.springsource.org/spring-security/site/docs/3.0.x/reference/el-access.html#el-pre-post-annotations for examples of annotation-based authorization specifications...

Jato answered 13/6, 2011 at 10:40 Comment(1)
Thanks Joseph, I will look into this as an optionPuca

© 2022 - 2024 — McMap. All rights reserved.