hsluoyz commented on issue #150:
URL: 
https://github.com/apache/casbin-lua-casbin/issues/150#issuecomment-5205797044

   Hi @lilililizheng, lua-casbin now ships a SQL adapter for exactly this: 
8d120a0 
(https://github.com/apache/casbin-lua-casbin/commit/8d120a0f5b24239643057cbfb7aa2543a2df28fa).
   
   It stores the policy in the standard `casbin_rule` table (`ptype, v0..v5`), 
so it is compatible with the tables written by the Casbin adapters of other 
languages. It has no dependency of its own — you pass it the database client 
you already have, i.e. any object with a `query(sql)` method, which is the 
shape of `lua-resty-mysql` and `pgmoon`. That means it works inside APISIX 
without pulling in anything new. Filtered loading (`loadFilteredPolicy`) is 
supported too, so a large policy table does not have to be held in memory as a 
whole. See the README section on adapters for MySQL and PostgreSQL examples. To 
use it from the APISIX `authz-casbin` plugin, APISIX will need to bump its 
pinned `casbin` rock version once this is released.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to