Questions tagged [casbin]

casbin is an open-source access control library. It provides support for enforcing authorization based on various access control models such as ACLs, RBAC and ABAC. The core implementation of casbin is programmed in Go, but there are ports in mutilple languages: Python, PHP, Node, .Net and Java.

References

22 questions
1
vote
0 answers

crate casbin policy for specific need

Is it possible to have policy which grant read read access to all resource except for specific one. My current policy is: p, read_some, data1, read p, read_all, data2, read p, read_all, data3, read g, read_all, read_some Is it possible to…
jason135
  • 61
  • 1
  • 6
1
vote
0 answers

How to secure resources with Casbin based on multiple groups membership

What is the best option to implement such security in Casbin? I have several folders, each of them has its own security (i.e. the users allowed to accede it) But that's not enough, the action a user is allowed to performed in a folder depends on…
Julien
  • 47
  • 4
1
vote
1 answer

Error: filtered policies are not supported by this adapter

This TypeORMAdapter (https://github.com/node-casbin/typeorm-adapter) supports FilteredAdapter however not sure why I'm getting below error : - Error: filtered policies are not supported by this adapter message:"filtered policies are not supported by…
vinod827
  • 366
  • 4
  • 16
1
vote
0 answers

Enforce Casbin policy into SQL WHERE

I have trouble implementing ABAC with Postgresql. My plan is to use Cabsin but I can't figure out how translate Cabsin security clauses into SQL WHERE predicates.
msu
  • 11
  • 1
1
vote
1 answer

What best practices or access control models are recommended for implementing fine-grained access control

We are currently building a webapp, which has several user roles. Each user has one or more roles assigned, which grants them permission to interact with specific parts (REST resources) of the webapp. For example, a user with role admin is allowed…
1
vote
0 answers

how casbin can be used for abac with large user base

I am trying to use casbin for my project ABAC and RBAC I am stuck in understanding this marchers [request_definition] r = sub, obj, act [policy_definition] p = sub, obj, act [role_definition] g = _, _ [policy_effect] e = some(where (p.eft ==…
kcoder
  • 1,701
  • 2
  • 18
  • 39
1
vote
0 answers

ES 2015 Import all using asterisk

I'm implementing node-casbin in my project. I tried importing everything into my project using the code below. import * as casbin from 'casbin'; When I save my Node.js server crashes with the error below. import * as casbin from 'casbin'; …
CloudBranch
  • 643
  • 2
  • 10
  • 18
1
vote
1 answer

How to use Casbin to setup dynamic RBAC with Beego?

How do I setup dynamic RBAC using Casbin with Beego? I am using MySQL database via Beego ORM and able to login. However, I want to setup roles and permissions. I also explored gorbac but I am interested to use Casbin.
Prashant
  • 1,885
  • 2
  • 14
  • 22
0
votes
0 answers

Casbin: Retrieve all objects for subject with particular action. RBAC use case

I need to implement custom RBAC support for my product and I stumbled upon casbin/jcasbin that looks promising. I am checking java API and I do not seem to find a way to fetch all objects of a particular type that a user has access to. Say, I am…
Ihor M.
  • 1,831
  • 1
  • 27
  • 51
0
votes
0 answers

rpc Enforce (EnforceRequest) returns (BoolReply) {}

rpc Enforce (EnforceRequest) returns (BoolReply) {} What does {} mean at the end of the line? From the official documentation, I know that service methods are defined like - rpc Enforce (EnforceRequest) returns (BoolReply);
0
votes
0 answers

Handling resource authorization on RESTful API implemented with FastAPI

I'm building a small RESTful API using Python and FastAPI and I need to handle authorizations to some of the resources in this API (api.foo.co/things/restricted/, I want /restricted to be accessed only by some users/groups/something else). Is there…
Vladoski
  • 107
  • 7
0
votes
1 answer

missing generics for trait `actix_service::Service` --> src/middleware.rs:57:8

How do I implement traits? On running cargo build I get this error. Also I commented out type Request = ServiceRequest;. How would this affect the code? I updated actix-service to 2.0.0-beta.2 in Cargo.toml, then the build failed. error[E0107]:…
0
votes
0 answers

casbin nested resources (resource groups) config, not RBAC

I need to write a casbin config to implement user roles and nested resources (objects) in a node.js application. For users RBAC works well, propagating allowed rules from roles down to users. For resources (objects) I need a different policy: If obj…
Anton
  • 328
  • 3
  • 12
0
votes
1 answer

Casbin: user may only call path with their own username

I'm trying to implement Casbin authentication so that a user can only get their own username, but apply this to a group. Example: /users/get/alice can be called by user with username alice /users/get/john50 can be called by user with username…
Josh Laird
  • 6,107
  • 3
  • 32
  • 59
0
votes
1 answer

How to create Casbin model and policy for roles and resources that belongs to folders?

I'm trying to create a Casbin RBAC + ACL model. The business requirement is as follows: We have an Organization, and within Organization you can create Folders. There are special folders like Workspace folder. Basically, the folders are a way to…
JobaDiniz
  • 642
  • 1
  • 10
  • 25
1
2