cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7557) User permissions for UDFs
Date Fri, 30 Jan 2015 10:39:35 GMT


Robert Stupp commented on CASSANDRA-7557:

Currently we allow creation of different kinds of resources using the same name.
{{CREATE TABLE foo …}}
{{CREATE TYPE foo …}}

This means that a granted permission like {{GRANT ALTER ON foo TO sheldon}} cannot distinguish
whether it means the table, the type or the function/aggregate.
I’m not sure whether we should enforce unique names for tables, types and functions in a
keyspace (I don’t think it’s necessary - at least for now).
But we should be precise (be able to distinguish) with permissions.

To achieve this, I propose to change permissions in {{Permission}} enum:
* add new {{EXECUTE}}  permission in {{Permission}} enum (global, per keyspace, per function

I’m not sure whether different resources for functions and aggregates should be used. But
since we have different statements for functions and aggregates, I’d like to have different
resources for them (new {{FunctionResource implements IResource}}.

The ”old” {{CREATE}} permission would then be migrated in {{o.a.c.auth.CassandraAuthorizer#convertLegacyData}}
to {{CREATE_KEYSPACE}} + {{CREATE_TABLE}} (or just {{CREATE_TABLE}} if the resource is a keyspace).
Similar for {{ALTER}} + {{DROP}}.
Alternative is to leave {{CREATE}}, {{ALTER}} and {{DROP}} permissions and imply that these
are only meant for data (keyspaces + tables + types).

Drawback of my proposal is that the {{LIST (permissions)}} statement would return a non-backwards
compatible result.

> User permissions for UDFs
> -------------------------
>                 Key: CASSANDRA-7557
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tyler Hobbs
>            Assignee: Robert Stupp
>              Labels: client-impacting, cql, udf
>             Fix For: 3.0
> We probably want some new permissions for user defined functions.  Most RDBMSes split
function permissions roughly into {{EXECUTE}} and {{CREATE}}/{{ALTER}}/{{DROP}} permissions.

This message was sent by Atlassian JIRA

View raw message