Skip to content
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

Implement auth and permissions caching #15

Open
troian opened this issue May 24, 2017 · 2 comments
Open

Implement auth and permissions caching #15

troian opened this issue May 24, 2017 · 2 comments
Assignees

Comments

@troian
Copy link
Member

troian commented May 24, 2017

Auth backend might be actually remote thus auth request might take significant time espessialy on publish/subscribe request due to permissions lookup and math.
Need some interface AuthCache provided as option to each auth provider.
Implementation should cache only successful auth requests. Form of storing might be like that:
username:
auth: allow
permissions: []array of successful permissions

Each cache entry might be invalidated

troian added a commit that referenced this issue May 24, 2017
Signed-off-by: Artur Troian <troian.ap@gmail.com>
@hsluoyz
Copy link

hsluoyz commented Jun 5, 2017

Hi, I'm the author of Casbin. It is an authorization library that supports models like ACL, RBAC, ABAC.

Related to RBAC, Casbin has several advantages:

  1. roles can be cascaded, aka roles can have roles.
  2. support resource roles, so users have their roles and resource have their roles too. role = group here.
  3. the permission assignments (or policy in casbin's language) can be persisted in files or database.

Casbin can also easily support authorization decision cache easily.

So please consider using Casbin when surgemq implements auth security. Also let me know if there's any question:)

@troian
Copy link
Member Author

troian commented Jun 7, 2017

@hsluoyz thanks a lot for pointing this out. I'll take a look

@troian troian self-assigned this Jun 9, 2017
@troian troian added this to TODO in Release v1.0.0 Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants