You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When adding a domain matching function to the default RoleManager, it triggers a rebuild call of the internal DomainManager, this function never seems to finishing executing on a large dataset. Internally it seems to be trying to "AddLinks" forever.
** Model - HRBAC with ABAC**
[request_definition]
r = sub, tenant, perm, act, eft
[policy_definition]
p = sub, tenant, perm, act, eft
[role_definition]
g = _, _, _
[policy_effect]
e = some(where (p.eft == allow)) && !some(where (p.eft == deny))
[matchers]
m = (g(r.sub, p.sub, r.tenant) && keyMatch4(r.tenant, p.tenant) && r.perm == p.perm && regexMatch(r.act, p.act))
** Policy data **
Here's a small sample of some of the policy data showing permissions with actions grouped under roles. And wildcarding on the role_superuser1 grouping so it can work across X tenants. Typically the policy dataset is ~45000 database rows.
For example user id 7073 is a super user and can do anything across any tenant. Where as user 65716 is just a creator for tenant 753.
I can email/private message a copy of the full policy dataset for bug replication.
To Reproduce
Steps to reproduce the behavior:
Go to load the data into an enforcer
Setup the default role manager with a domain matching function roleManager.AddDomainMatchingFunc("KeyMatch", util.KeyMatch)
Notice that the function never exits.
Expected behavior
No infinite loop/long running behaviour
Desktop (please complete the following information):
OS: MacOS 12.1
Golang v1.18
Version Casbin v2.47.1
Additional context
If I load this dataset with an older version of Casbin v2.31.4 I don't have this infinite loop problem, but my Enforce calls against the model and policy data set are extremely slow, ~ 10-12seconds. Similar to what's reported in this issue: #1004
Want to prioritise this issue? Try:
Describe the bug
When adding a domain matching function to the default RoleManager, it triggers a rebuild call of the internal DomainManager, this function never seems to finishing executing on a large dataset. Internally it seems to be trying to "AddLinks" forever.
** Model - HRBAC with ABAC**
** Policy data **
Here's a small sample of some of the policy data showing permissions with actions grouped under roles. And wildcarding on the
role_superuser1
grouping so it can work across X tenants. Typically the policy dataset is ~45000 database rows.For example user id 7073 is a super user and can do anything across any tenant. Where as user 65716 is just a creator for tenant 753.
I can email/private message a copy of the full policy dataset for bug replication.
To Reproduce
Steps to reproduce the behavior:
roleManager.AddDomainMatchingFunc("KeyMatch", util.KeyMatch)
Expected behavior
No infinite loop/long running behaviour
Desktop (please complete the following information):
Additional context
If I load this dataset with an older version of Casbin v2.31.4 I don't have this infinite loop problem, but my Enforce calls against the model and policy data set are extremely slow, ~ 10-12seconds. Similar to what's reported in this issue: #1004
IssueHunt Summary
Backers (Total: $200.00)
Submitted pull Requests
Become a backer now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: