casbin / lua-casbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (Kong, APISIX, OpenResty)
Apache License 2.0
55 stars 18 forks source link

Lua implementation of Casbin #1

Closed kolotaev closed 3 years ago

kolotaev commented 4 years ago

Hello,

I'm wondering if there is a Lua implementation of Casbin in the wild at all? I didn't manage to find any except this one. And if this repo is a placeholder for the future work, when is it planned to be implemented?

Thank you.

hsluoyz commented 4 years ago

See: https://github.com/casbin/casbin/issues/274#issuecomment-695148008

We will consider to make a new Lua implementation these months: https://github.com/casbin/casbin-lua Maybe let a GSoC student work on it next summer.

kolotaev commented 4 years ago

Thanks for the info!

Another thing that came to my mind is the implementation of Casbin in C (which is already done by the time I'm writing it). Thus it can be relatively easy used from Lua c-bindings. The upside of this approach is a shared/whatever library that can be used by other (especially interpreted) languages that are not already implemented or a as an option to boost performance - it's rather a common approach (see for instance gRPC core implementation).

hsluoyz commented 3 years ago

Yeah, using C to wrap a Lua lib is an option. But Lua & nginx & OpenResty are so important that we may also consider implementing Casbin directly in Lua. This will be our next goal!

hsluoyz commented 3 years ago

Actually we want it to be a GSoC 2021 task definitely.

@divy9881 do you have interest in the task of implementing Casbin in Lua?

hsluoyz commented 3 years ago

Moved to: https://github.com/casbin/lua-casbin/issues/2