mirror of https://github.com/apache/cassandra
disallow user modification of System keyspace
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-3759
This commit is contained in:
parent
23026fdf32
commit
341611095a
|
|
@ -1,4 +1,5 @@
|
|||
1.0.8
|
||||
* disallow user modification of System keyspace (CASSANDRA-3738)
|
||||
* allow using sstable2json on secondary index data (CASSANDRA-3738)
|
||||
* (cqlsh) add DESCRIBE COLUMNFAMILIES (CASSANDRA-3586)
|
||||
* (cqlsh) format blobs correctly and use colors to improve output
|
||||
|
|
|
|||
|
|
@ -123,6 +123,10 @@ public class ClientState
|
|||
{
|
||||
validateLogin();
|
||||
|
||||
// hardcode disallowing messing with system keyspace
|
||||
if (keyspace.equalsIgnoreCase(Table.SYSTEM_TABLE) && perm == Permission.WRITE)
|
||||
throw new InvalidRequestException("system keyspace is not user-modifiable");
|
||||
|
||||
resourceClear();
|
||||
Set<Permission> perms = DatabaseDescriptor.getAuthority().authorize(user, resource);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue