ETCD adapter is the policy storage adapter for Casbin. With this library, Casbin can load policy from ETCD and save policy to it. ETCD adapter support the Auto-Save feature for Casbin policy. This means it can support:
- Add a single policy rule to the storage
- Remove a single policy rule from the storage.
- Add a set of policies rule to the storage.
- Remove a set of policies rule to the storage.
Additional, this version has enhancements:
- Fully control the Etcd configuration. It will be useful if Etcd is enable authentication.
- Support Etcd namespace.
- Use casbin/v2 (as v1 casbin panic's instead of returning errors).
- Use "go.etcd.io/etcd/client/v3" instead of the outdated github pkg.
go get github.com/ntk148v/etcd-adapter
Check the examples folder
This project is under Apache 2.0 License. See the LICENSE file for the full license text.