<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: GRANT and REVOKE explanation for CQL3 (cassandra 1.2.0)</title>
		<link>http://www.datastax.com/support-forums/topic/grant-and-revoke-explanation-for-cql3-cassandra-120</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Thu, 20 Jun 2013 07:49:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/grant-and-revoke-explanation-for-cql3-cassandra-120" rel="self" type="application/rss+xml" />

		<item>
			<title>khahn on "GRANT and REVOKE explanation for CQL3 (cassandra 1.2.0)"</title>
			<link>http://www.datastax.com/support-forums/topic/grant-and-revoke-explanation-for-cql3-cassandra-120#post-8506</link>
			<pubDate>Fri, 18 Jan 2013 23:39:51 +0000</pubDate>
			<dc:creator>khahn</dc:creator>
			<guid isPermaLink="false">8506@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Sorry for the delay and that you were inconvenienced by the outdated material.  &#60;/p&#62;
&#60;p&#62;GRANT PERMISSIONS&#60;br /&#62;
Provides users access to database objects.&#60;/p&#62;
&#60;p&#62;GRANT ALL&#124; ALL PERMISSIONS permission_name PERMISSION ON resource TO user WITH GRANT OPTION&#60;/p&#62;
&#60;p&#62;(there are options in this syntax that don't copy over)&#60;/p&#62;
&#60;p&#62;permission_name is one of these:&#60;/p&#62;
&#60;p&#62;ALL&#60;br /&#62;
ALL PERMISSIONS&#60;br /&#62;
ALTER&#60;br /&#62;
AUTHORIZE&#60;br /&#62;
CREATE&#60;br /&#62;
DROP&#60;br /&#62;
FULL_ACCESS&#60;br /&#62;
MODIFY&#60;br /&#62;
NO_ACCESS&#60;br /&#62;
SELECT&#60;/p&#62;
&#60;p&#62;resource is one of these:&#60;/p&#62;
&#60;p&#62;ALL KEYSPACES&#60;br /&#62;
KEYSPACE keyspace_name&#60;br /&#62;
TABLE keyspace_name.table_name&#60;/p&#62;
&#60;p&#62;Description&#60;/p&#62;
&#60;p&#62;Permissions to access all keyspaces, a named keyspace, or a table can be granted to a user. This table lists the permissions needed to use cqlsh statements:&#60;/p&#62;
&#60;p&#62;Permission	cqlsh Statements&#60;br /&#62;
ALTER	        ALTER KEYSPACE, ALTER TABLE, CREATE INDEX, DROP INDEX&#60;br /&#62;
AUTHORIZE	GRANT, REVOKE&#60;br /&#62;
CREATE	        CREATE KEYSPACE, CREATE TABLE&#60;br /&#62;
DROP	        DROP KEYSPACE, DROP TABLE&#60;br /&#62;
MODIFY	        INSERT, DELETE, UPDATE, TRUNCATE&#60;br /&#62;
SELECT	        SELECT&#60;/p&#62;
&#60;p&#62;The authorize permission gives a user the ability to grant access with the grant option, not just grant permissions to other users. Currently granting permissions on indexes and configuration options are not available at this time.&#60;/p&#62;
&#60;p&#62;Examples&#60;/p&#62;
&#60;p&#62;Give 'bashful' permission to perform SELECT queries on all tables in all keyspaces:&#60;/p&#62;
&#60;p&#62;GRANT SELECT ON ALL KEYSPACES TO bashful;&#60;br /&#62;
Give 'dopey' permission to perform INSERT, UPDATE, DELETE and TRUNCATE queries on all tables in the 'woods' keyspace:&#60;/p&#62;
&#60;p&#62;GRANT MODIFY ON KEYSPACE woods TO dopey;&#60;br /&#62;
Give 'doc' permission to perform ALTER KEYSPACE queries on the 'mines' keyspace, and also ALTER TABLE, CREATE INDEX and DROP INDEX queries on all tables in 'mines' keyspace:&#60;/p&#62;
&#60;p&#62;GRANT ALTER ON KEYSPACE mines TO doc;&#60;br /&#62;
Give 'doc' permission to run all types of queries on cottage.chores table:&#60;/p&#62;
&#60;p&#62;GRANT ALL PERMISSIONS ON cottage.chores TO doc;&#60;br /&#62;
SELECT permission&#60;/p&#62;
&#60;p&#62;Permissions checks are recursive: To be able to perform SELECT queries on ‘my_table’ you have to have SELECT permission on the table OR on its parent keyspace OR on ALL KEYSPACES.&#60;/p&#62;
&#60;p&#62;CREATE permission&#60;/p&#62;
&#60;p&#62;To be able to CREATE TABLE you need CREATE permission on its parent keyspace or ALL KEYSPACES. etc. To be able to CREATE KEYSPACE you need CREATE permission on ALL KEYSPACES.&#60;/p&#62;
&#60;p&#62;GRANT, REVOKE, and LIST&#60;/p&#62;
&#60;p&#62;To grant access to a keyspace to just one user, assuming nobody else has ALL KEYSPACES access, you use this statement:&#60;/p&#62;
&#60;p&#62;GRANT ALL ON KEYSPACE keyspace_name TO user_name&#60;br /&#62;
GRANT, REVOKE and LIST check for table/keyspace existence before execution. GRANT and REVOKE check for user existence after IAuthenticator rewrite is complete.&#60;/p&#62;
&#60;p&#62;REVOKE PERMISSIONS&#60;/p&#62;
&#60;p&#62;REVOKE ALL&#124; ALL PERMISSIONS permission_name PERMISSION   ON resource FROM user_name&#60;br /&#62;
permission_name is one of these:&#60;/p&#62;
&#60;p&#62;ALL&#60;br /&#62;
ALL PERMISSIONS&#60;br /&#62;
ALTER&#60;br /&#62;
AUTHORIZE&#60;br /&#62;
CREATE&#60;br /&#62;
DROP&#60;br /&#62;
FULL_ACCESS&#60;br /&#62;
MODIFY&#60;br /&#62;
NO_ACCESS&#60;br /&#62;
SELECT&#60;/p&#62;
&#60;p&#62;resource is one of these:&#60;/p&#62;
&#60;p&#62;ALL KEYSPACES&#60;br /&#62;
KEYSPACE keyspace_name&#60;br /&#62;
TABLE keyspace_name.table_name&#60;/p&#62;
&#60;p&#62;Description&#60;/p&#62;
&#60;p&#62;Permissions to access all keyspaces, a named keyspace, or a table can be revoked from a user. This table lists the permissions needed to use cqlsh statements:&#60;/p&#62;
&#60;p&#62;Permission	cqlsh Statements&#60;br /&#62;
ALTER	        ALTER KEYSPACE, ALTER TABLE, CREATE INDEX, DROP INDEX&#60;br /&#62;
AUTHORIZE	GRANT, REVOKE&#60;br /&#62;
CREATE	        CREATE KEYSPACE, CREATE TABLE&#60;br /&#62;
DROP	        DROP KEYSPACE, DROP TABLE&#60;br /&#62;
MODIFY	        INSERT, DELETE, UPDATE, TRUNCATE&#60;br /&#62;
SELECT	       SELECT&#60;/p&#62;
&#60;p&#62;Example&#60;/p&#62;
&#60;p&#62;REVOKE SELECT ON cottage.chores FROM doc;&#60;/p&#62;
&#60;p&#62;The user doc can no longer perform SELECT queries on the cottage.chores table.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sarch on "GRANT and REVOKE explanation for CQL3 (cassandra 1.2.0)"</title>
			<link>http://www.datastax.com/support-forums/topic/grant-and-revoke-explanation-for-cql3-cassandra-120#post-8458</link>
			<pubDate>Wed, 16 Jan 2013 16:10:42 +0000</pubDate>
			<dc:creator>sarch</dc:creator>
			<guid isPermaLink="false">8458@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;khahn, thanks for the info, but unfortunately I've already found those pages.&#60;/p&#62;
&#60;p&#62;The datastax blog about dynamic permissions is out of date now with 1.2.0 ('GRANT FULL_ACCESS ...'; 'LIST GRANTS ...'; and 'GRANT UPDATE ON ks' all don't work).&#60;/p&#62;
&#60;p&#62;And as you've discovered, the official 1.2 documentation don't mention GRANT and the CQL3 spec mentions that they are keywords, but do not have any more information on how to use them.&#60;/p&#62;
&#60;p&#62;I was hoping that there would be some internal documentation or mailings that would shed some light on the issue. At the moment I'm having to bastardise the code to make it fit what it says it should do.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>khahn on "GRANT and REVOKE explanation for CQL3 (cassandra 1.2.0)"</title>
			<link>http://www.datastax.com/support-forums/topic/grant-and-revoke-explanation-for-cql3-cassandra-120#post-8411</link>
			<pubDate>Mon, 14 Jan 2013 18:55:38 +0000</pubDate>
			<dc:creator>khahn</dc:creator>
			<guid isPermaLink="false">8411@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;I found an explanation of how GRANT/REVOKE is supposed to work in cassandra &#38;gt;= 1.2.0, but have not actually tried this: &#60;a href=&#34;http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The official DataStax 1.2 docs do not include information about GRANT/REVOKE. Authentication and authorization are briefly covered in &#60;a href=&#34;http://www.datastax.com/docs/1.2/configuration/authentication&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/1.2/configuration/authentication&#60;/a&#62;. Hope this helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sarch on "GRANT and REVOKE explanation for CQL3 (cassandra 1.2.0)"</title>
			<link>http://www.datastax.com/support-forums/topic/grant-and-revoke-explanation-for-cql3-cassandra-120#post-8403</link>
			<pubDate>Mon, 14 Jan 2013 14:13:31 +0000</pubDate>
			<dc:creator>sarch</dc:creator>
			<guid isPermaLink="false">8403@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;I'm trying to implement an internal Cassandra-as-a-service and want to use the permissions/authorization in CQL3 to implement this.&#60;/p&#62;
&#60;p&#62;Is there any explanation of how GRANT/REVOKE is supposed to work in cassandra &#38;gt;= 1.2.0? I've played around with it a bit, but it can only be done at the column-family (/table) level. I can't find a way of applying GRANT privileges on an entire keyspace or inherit them for new column families that are created.&#60;/p&#62;
&#60;p&#62;Does anyone know how they are supposed to function?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
