Spring-Boot integrates GRPC to implement GRPC client and communicate with casbin-server GRPC server
- model
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act, eft
[policy_effect]
e = some(where (p.eft == allow)) && !some(where (p.eft == deny))
[matchers]
m = r.sub == p.sub && keyMatch(r.obj, p.obj) && keyMatch(r.act, p.act)
- policy
p, cjc, acrn:smc:pushing:*:vod:ListMusics, pushing:ListMusics, allow
p, cjc, acrn:smc:pushing:*:vod:DescribeMusic, pushing:DescribeMusic, allow
p, cjc, acrn:smc:pushing:*:vod:CreateMusic, pushing:CreateMusic, allow
p, cjc, acrn:smc:pushing:*:vod:UpdateMusic, pushing:UpdateMusic, allow
p, cjc, acrn:smc:pushing:*:vod:DeleteMusic, pushing:UpdateMusic, allow
p, zym, acrn:smc:pushing:*:vod:ListMusics, pushing:ListMusics, allow
p, zym, acrn:smc:pushing:*:vod:DescribeMusic, pushing:DescribeMusic, allow
p, je, acrn:smc:pushing:*:vod:DescribeMusic, pushing:DescribeMusic, allow
p, david, *, *, allow
p, alice, *, List*, allow
-
2.Casbin-server is not enabled (when server is enabled,client can access server directly without restarting)
The PostMan interface test data is in the PostMan folder(casbin-client.postman_collection.json)