casbin / casbin-cpp

An authorization library that supports access control models like ACL, RBAC, ABAC in C/C++
https://casbin.org
Apache License 2.0
218 stars 61 forks source link

[Question] no test for ABAC #208

Closed JalinWang closed 1 year ago

JalinWang commented 1 year ago

I'm wondering why there is no test for ABAC. There used to be some test cases, but they are gone after duktape evaluator is removed in https://github.com/casbin/casbin-cpp/pull/196

Searching result: https://github.com/casbin/casbin-cpp/search?l=C%2B%2B&q=ABAC

casbin-bot commented 1 year ago

@EmperorYP7 @sheny1xuan @cs1137195420

hsluoyz commented 1 year ago

Hi @sheny1xuan any reasons for removing the ABAC tests?

/cc @EmperorYP7 @cs1137195420

sheny1xuan commented 1 year ago

@JalinWang Yes, exprtk evaluator don't support ABAC. duktape evaluator didn't support total ABAC, we use json for input rather than reflection. std library don't support reflection, we need to think of new ways to support ABAC.

JalinWang commented 1 year ago

@JalinWang Yes, exprtk evaluator don't support ABAC. duktape evaluator didn't support total ABAC, we use json for input rather than reflection. std library don't support reflection, we need to think of new ways to support ABAC.

@sheny1xuan uhh it sounds like a breaking change. I think it would be better to add a note somewhere, e.g., https://casbin.io/docs/overview#feature-set-for-different-languages, as well as a description in PR https://github.com/casbin/casbin-cpp/pull/196 for tracking. It has taken me some time to reason about what happened with https://github.com/casbin/casbin-cpp/pull/170 https://github.com/casbin/casbin-cpp/pull/189#issuecomment-1066779734 https://github.com/casbin/casbin-cpp/pull/196/

hsluoyz commented 1 year ago

@sheny1xuan so we are losing some features after the change? Which features are still missing? Can we create some issues to track these missing ones?