casbin / jcasbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Java
https://casbin.org
Apache License 2.0
2.38k stars 461 forks source link

How does jcasbin connect to the database? #91

Closed liergou99 closed 4 years ago

liergou99 commented 4 years ago

How jcasbin connects to the database, for example: mysql, pg. Can jcasbin use an external authority table like SpringSecurity?

hsluoyz commented 4 years ago

@liergou99 jCasbin supports a lot of DBs, see the adapters under the Java tab: https://casbin.org/docs/en/adapters

liergou99 commented 4 years ago

It seems that Casbin's adapter cannot use external tables.

hsluoyz commented 4 years ago

What do you mean by "external tables"?

liergou99 commented 4 years ago

The application system generally has its own user table, such as users, roles, etc.

hsluoyz commented 4 years ago

Most adapters allow you to specify a DB name in args, so you can point it to an existing DB. By default it will save/load a table named "casbin_rule".