Awesome Open Source
Awesome Open Source

Cassandra Adapter Build Status Coverage Status Godoc

Cassandra Adapter is the Apache Cassandra DB adapter for Casbin. With this library, Casbin can load policy from Cassandra or save policy to it.


go get

Simple Example

package main

import (

func main() {
	// Initialize a Cassandra adapter and use it in a Casbin enforcer:
	a := cassandraadapter.NewAdapter("") // Your Cassandra hosts. 
	e := casbin.NewEnforcer("examples/rbac_model.conf", a)
	// Load the policy from DB.
	// Check the permission.
	e.Enforce("alice", "data1", "read")
	// Modify the policy.
	// e.AddPolicy(...)
	// e.RemovePolicy(...)
	// Save the policy back to DB.

Getting Help


This project is under Apache 2.0 License. See the LICENSE file for the full license text.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Go (198,127
Storage (1,708
Authorization (1,336
Adapter (610
Rbac (495
Acl (436
Access Control (398
Casbin (193
Abac (119
Storage Driver (25
Related Projects