This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
License
nedap/cassandra-auth
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Authentication and authorization provider for Cassandra This project implements an IAuthenticator and IAuthority2 interface usable for Cassandra authentication. It stores the credentials in Cassandra itself, using the following column family definitions. They are described as CQL3 definitions. This implementation of authentication and authorization has led to the inclusion of a very similar implementation in cassandra version 1.2. Users of cassandra 1.2 can now use the built-in functionality instead of this library, which includes built-in commands for adding and listing users and authorizations. CREATE KEYSPACE access WITH strategy_class = 'org.apache.cassandra.locator.AllNodeStrategy'; CREATE TABLE users ( username varchar PRIMARY KEY, password varchar ); CREATE TABLE permissions ( username varchar, resource varchar, permissions bigint, PRIMARY KEY (username, resource)) WITH COMPACT STORAGE; INSERT INTO users (username, password) VALUES ('admin', '65536:256:b987965bf13ae010:7bc9e5e6f76e8a1424d9a44c9f5648e7b58da35a315b46049bbca360b3609d78'); INSERT INTO permissions (username, resource, permissions) VALUES ('admin', '/cassandra/keyspaces', 8791798056959); The passwords can be generated by building the jar file. This can be done by executing mvn package. After this you can run the password generator: java -jar target/cassandra-auth-1.0.jar When entering the password it will output the entry for that password that needs to be stored. The permissions is a long which is composed of two 32 bit masks, one for the grant rights and one for the access rights. The bitmask shown here grants all the access to this user (Permission.ALL).
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published