public class org.apache.cassandra.auth.CassandraRoleManager implements org.apache.cassandra.auth.IRoleManager
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.auth.CassandraRoleManager
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static final java.lang.String DEFAULT_SUPERUSER_NAME;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "cassandra"
static final java.lang.String DEFAULT_SUPERUSER_PASSWORD;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "cassandra"
private static final com.google.common.base.Function<org.apache.cassandra.cql3.UntypedResultSet$Row, org.apache.cassandra.auth.CassandraRoleManager$Role> ROW_TO_ROLE;
descriptor: Lcom/google/common/base/Function;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Lcom/google/common/base/Function<Lorg/apache/cassandra/cql3/UntypedResultSet$Row;Lorg/apache/cassandra/auth/CassandraRoleManager$Role;>;
public static final java.lang.String LEGACY_USERS_TABLE;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "users"
private static final com.google.common.base.Function<org.apache.cassandra.cql3.UntypedResultSet$Row, org.apache.cassandra.auth.CassandraRoleManager$Role> LEGACY_ROW_TO_ROLE;
descriptor: Lcom/google/common/base/Function;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Lcom/google/common/base/Function<Lorg/apache/cassandra/cql3/UntypedResultSet$Row;Lorg/apache/cassandra/auth/CassandraRoleManager$Role;>;
private static final java.lang.String GENSALT_LOG2_ROUNDS_PROPERTY;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "cassandra.auth_bcrypt_gensalt_log2_rounds"
private static final int GENSALT_LOG2_ROUNDS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.cassandra.auth.CassandraRoleManager$Role NULL_ROLE;
descriptor: Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private org.apache.cassandra.cql3.statements.SelectStatement loadRoleStatement;
descriptor: Lorg/apache/cassandra/cql3/statements/SelectStatement;
flags: (0x0002) ACC_PRIVATE
private org.apache.cassandra.cql3.statements.SelectStatement legacySelectUserStatement;
descriptor: Lorg/apache/cassandra/cql3/statements/SelectStatement;
flags: (0x0002) ACC_PRIVATE
private final java.util.Set<org.apache.cassandra.auth.IRoleManager$Option> supportedOptions;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/cassandra/auth/IRoleManager$Option;>;
private final java.util.Set<org.apache.cassandra.auth.IRoleManager$Option> alterableOptions;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/cassandra/auth/IRoleManager$Option;>;
private volatile boolean isClusterReady;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/auth/CassandraRoleManager;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
1: new org.apache.cassandra.auth.CassandraRoleManager$1
dup
invokespecial org.apache.cassandra.auth.CassandraRoleManager$1.<init>:()V
putstatic org.apache.cassandra.auth.CassandraRoleManager.ROW_TO_ROLE:Lcom/google/common/base/Function;
2: new org.apache.cassandra.auth.CassandraRoleManager$2
dup
invokespecial org.apache.cassandra.auth.CassandraRoleManager$2.<init>:()V
putstatic org.apache.cassandra.auth.CassandraRoleManager.LEGACY_ROW_TO_ROLE:Lcom/google/common/base/Function;
3: invokestatic org.apache.cassandra.auth.CassandraRoleManager.getGensaltLogRounds:()I
putstatic org.apache.cassandra.auth.CassandraRoleManager.GENSALT_LOG2_ROUNDS:I
4: new org.apache.cassandra.auth.CassandraRoleManager$Role
dup
aconst_null
iconst_0
iconst_0
invokestatic java.util.Collections.emptySet:()Ljava/util/Set;
invokespecial org.apache.cassandra.auth.CassandraRoleManager$Role.<init>:(Ljava/lang/String;ZZLjava/util/Set;)V
putstatic org.apache.cassandra.auth.CassandraRoleManager.NULL_ROLE:Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
return
LocalVariableTable:
Start End Slot Name Signature
static int getGensaltLogRounds();
descriptor: ()I
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=1, args_size=0
0: ldc "cassandra.auth_bcrypt_gensalt_log2_rounds"
bipush 10
invokestatic java.lang.Integer.getInteger:(Ljava/lang/String;I)Ljava/lang/Integer;
invokevirtual java.lang.Integer.intValue:()I
istore 0
start local 0 1: iload 0
iconst_4
if_icmplt 2
iload 0
bipush 31
if_icmple 5
2: StackMap locals: int
StackMap stack:
new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "Bad value for system property -D%s.Please use a value between 4 and 31 inclusively"
iconst_1
anewarray java.lang.Object
dup
iconst_0
3: ldc "cassandra.auth_bcrypt_gensalt_log2_rounds"
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
iload 0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 6 0 rounds I
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield org.apache.cassandra.auth.CassandraRoleManager.isClusterReady:Z
2: aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthenticator:()Lorg/apache/cassandra/auth/IAuthenticator;
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc Lorg/apache/cassandra/auth/PasswordAuthenticator;
if_acmpne 4
3: getstatic org.apache.cassandra.auth.IRoleManager$Option.LOGIN:Lorg/apache/cassandra/auth/IRoleManager$Option;
getstatic org.apache.cassandra.auth.IRoleManager$Option.SUPERUSER:Lorg/apache/cassandra/auth/IRoleManager$Option;
getstatic org.apache.cassandra.auth.IRoleManager$Option.PASSWORD:Lorg/apache/cassandra/auth/IRoleManager$Option;
invokestatic com.google.common.collect.ImmutableSet.of:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
goto 5
4: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager
StackMap stack: org.apache.cassandra.auth.CassandraRoleManager
getstatic org.apache.cassandra.auth.IRoleManager$Option.LOGIN:Lorg/apache/cassandra/auth/IRoleManager$Option;
getstatic org.apache.cassandra.auth.IRoleManager$Option.SUPERUSER:Lorg/apache/cassandra/auth/IRoleManager$Option;
invokestatic com.google.common.collect.ImmutableSet.of:(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
5: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager
StackMap stack: org.apache.cassandra.auth.CassandraRoleManager com.google.common.collect.ImmutableSet
putfield org.apache.cassandra.auth.CassandraRoleManager.supportedOptions:Ljava/util/Set;
6: aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthenticator:()Lorg/apache/cassandra/auth/IAuthenticator;
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc Lorg/apache/cassandra/auth/PasswordAuthenticator;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 8
7: getstatic org.apache.cassandra.auth.IRoleManager$Option.PASSWORD:Lorg/apache/cassandra/auth/IRoleManager$Option;
invokestatic com.google.common.collect.ImmutableSet.of:(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
goto 9
8: StackMap locals:
StackMap stack: org.apache.cassandra.auth.CassandraRoleManager
invokestatic com.google.common.collect.ImmutableSet.of:()Lcom/google/common/collect/ImmutableSet;
9: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager
StackMap stack: org.apache.cassandra.auth.CassandraRoleManager com.google.common.collect.ImmutableSet
putfield org.apache.cassandra.auth.CassandraRoleManager.alterableOptions:Ljava/util/Set;
10: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
public void setup();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
aload 0
ldc "SELECT * from %s.%s WHERE role = ?"
1: ldc "system_auth"
2: ldc "roles"
3: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.prepare:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/cql3/CQLStatement;
checkcast org.apache.cassandra.cql3.statements.SelectStatement
putfield org.apache.cassandra.auth.CassandraRoleManager.loadRoleStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
4: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
ldc "system_auth"
ldc "users"
invokevirtual org.apache.cassandra.config.Schema.getCFMetaData:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
ifnull 8
5: aload 0
aload 0
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.prepareLegacySelectUserStatement:()Lorg/apache/cassandra/cql3/statements/SelectStatement;
putfield org.apache.cassandra.auth.CassandraRoleManager.legacySelectUserStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
6: aload 0
aload 0
invokedynamic call(Lorg/apache/cassandra/auth/CassandraRoleManager;)Ljava/util/concurrent/Callable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Ljava/lang/Object;
org/apache/cassandra/auth/CassandraRoleManager.lambda$0()Ljava/lang/Void; (7)
()Ljava/lang/Void;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.scheduleSetupTask:(Ljava/util/concurrent/Callable;)V
7: goto 9
8: StackMap locals:
StackMap stack:
aload 0
invokedynamic call()Ljava/util/concurrent/Callable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Ljava/lang/Object;
org/apache/cassandra/auth/CassandraRoleManager.lambda$1()Ljava/lang/Void; (6)
()Ljava/lang/Void;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.scheduleSetupTask:(Ljava/util/concurrent/Callable;)V
9: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
public java.util.Set<org.apache.cassandra.auth.IRoleManager$Option> supportedOptions();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.supportedOptions:Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
Signature: ()Ljava/util/Set<Lorg/apache/cassandra/auth/IRoleManager$Option;>;
public java.util.Set<org.apache.cassandra.auth.IRoleManager$Option> alterableOptions();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.alterableOptions:Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
Signature: ()Ljava/util/Set<Lorg/apache/cassandra/auth/IRoleManager$Option;>;
public void createRole(org.apache.cassandra.auth.AuthenticatedUser, org.apache.cassandra.auth.RoleResource, org.apache.cassandra.auth.RoleOptions);
descriptor: (Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getPassword:()Lcom/google/common/base/Optional;
invokevirtual com.google.common.base.Optional.isPresent:()Z
ifeq 10
1: ldc "INSERT INTO %s.%s (role, is_superuser, can_login, salted_hash) VALUES ('%s', %s, %s, '%s')"
bipush 6
anewarray java.lang.Object
dup
iconst_0
2: ldc "system_auth"
aastore
dup
iconst_1
3: ldc "roles"
aastore
dup
iconst_2
4: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_3
5: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getSuperuser:()Lcom/google/common/base/Optional;
iconst_0
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual com.google.common.base.Optional.or:(Ljava/lang/Object;)Ljava/lang/Object;
aastore
dup
iconst_4
6: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getLogin:()Lcom/google/common/base/Optional;
iconst_0
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual com.google.common.base.Optional.or:(Ljava/lang/Object;)Ljava/lang/Object;
aastore
dup
iconst_5
7: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getPassword:()Lcom/google/common/base/Optional;
invokevirtual com.google.common.base.Optional.get:()Ljava/lang/Object;
checkcast java.lang.String
invokestatic org.apache.cassandra.auth.CassandraRoleManager.hashpw:(Ljava/lang/String;)Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
8: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
9: goto 17
10: StackMap locals:
StackMap stack:
ldc "INSERT INTO %s.%s (role, is_superuser, can_login) VALUES ('%s', %s, %s)"
iconst_5
anewarray java.lang.Object
dup
iconst_0
11: ldc "system_auth"
aastore
dup
iconst_1
12: ldc "roles"
aastore
dup
iconst_2
13: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_3
14: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getSuperuser:()Lcom/google/common/base/Optional;
iconst_0
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual com.google.common.base.Optional.or:(Ljava/lang/Object;)Ljava/lang/Object;
aastore
dup
iconst_4
15: aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getLogin:()Lcom/google/common/base/Optional;
iconst_0
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual com.google.common.base.Optional.or:(Ljava/lang/Object;)Ljava/lang/Object;
aastore
16: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
17: StackMap locals:
StackMap stack: java.lang.String
astore 4
start local 4 18: aload 0
aload 4
aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
19: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 20 1 performer Lorg/apache/cassandra/auth/AuthenticatedUser;
0 20 2 role Lorg/apache/cassandra/auth/RoleResource;
0 20 3 options Lorg/apache/cassandra/auth/RoleOptions;
18 20 4 insertCql Ljava/lang/String;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
performer
role
options
public void dropRole(org.apache.cassandra.auth.AuthenticatedUser, org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
ldc "DELETE FROM %s.%s WHERE role = '%s'"
iconst_3
anewarray java.lang.Object
dup
iconst_0
1: ldc "system_auth"
aastore
dup
iconst_1
2: ldc "roles"
aastore
dup
iconst_2
3: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
5: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
6: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
7: aload 0
aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.removeAllMembers:(Ljava/lang/String;)V
8: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 9 1 performer Lorg/apache/cassandra/auth/AuthenticatedUser;
0 9 2 role Lorg/apache/cassandra/auth/RoleResource;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
performer
role
public void alterRole(org.apache.cassandra.auth.AuthenticatedUser, org.apache.cassandra.auth.RoleResource, org.apache.cassandra.auth.RoleOptions);
descriptor: (Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: bipush 44
invokestatic com.google.common.base.Joiner.on:(C)Lcom/google/common/base/Joiner;
aload 0
aload 3
invokevirtual org.apache.cassandra.auth.RoleOptions.getOptions:()Ljava/util/Map;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.optionsToAssignments:(Ljava/util/Map;)Ljava/lang/Iterable;
1: invokestatic com.google.common.base.Predicates.notNull:()Lcom/google/common/base/Predicate;
2: invokestatic com.google.common.collect.Iterables.filter:(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Ljava/lang/Iterable;
invokevirtual com.google.common.base.Joiner.join:(Ljava/lang/Iterable;)Ljava/lang/String;
astore 4
start local 4 3: aload 4
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifne 12
4: aload 0
ldc "UPDATE %s.%s SET %s WHERE role = '%s'"
iconst_4
anewarray java.lang.Object
dup
iconst_0
5: ldc "system_auth"
aastore
dup
iconst_1
6: ldc "roles"
aastore
dup
iconst_2
7: aload 4
aastore
dup
iconst_3
8: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
9: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
10: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
11: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
12: StackMap locals: java.lang.String
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 13 1 performer Lorg/apache/cassandra/auth/AuthenticatedUser;
0 13 2 role Lorg/apache/cassandra/auth/RoleResource;
0 13 3 options Lorg/apache/cassandra/auth/RoleOptions;
3 13 4 assignments Ljava/lang/String;
MethodParameters:
Name Flags
performer
role
options
public void grantRole(org.apache.cassandra.auth.AuthenticatedUser, org.apache.cassandra.auth.RoleResource, org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleResource;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 3
iconst_1
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
aload 2
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 5
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "%s is a member of %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
dup
iconst_1
3: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
aload 2
iconst_1
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
aload 3
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 10
6: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "%s is a member of %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
7: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
dup
iconst_1
8: aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
9: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
ldc "+"
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.modifyRoleMembership:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
11: aload 0
ldc "INSERT INTO %s.%s (role, member) values ('%s', '%s')"
iconst_4
anewarray java.lang.Object
dup
iconst_0
12: ldc "system_auth"
aastore
dup
iconst_1
13: ldc "role_members"
aastore
dup
iconst_2
14: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_3
15: aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
16: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
17: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
18: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
19: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 20 1 performer Lorg/apache/cassandra/auth/AuthenticatedUser;
0 20 2 role Lorg/apache/cassandra/auth/RoleResource;
0 20 3 grantee Lorg/apache/cassandra/auth/RoleResource;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
performer
role
grantee
public void revokeRole(org.apache.cassandra.auth.AuthenticatedUser, org.apache.cassandra.auth.RoleResource, org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleResource;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 3
iconst_0
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
aload 2
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 5
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "%s is not a member of %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
dup
iconst_1
3: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
ldc "-"
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.modifyRoleMembership:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
6: aload 0
ldc "DELETE FROM %s.%s WHERE role = '%s' and member = '%s'"
iconst_4
anewarray java.lang.Object
dup
iconst_0
7: ldc "system_auth"
aastore
dup
iconst_1
8: ldc "role_members"
aastore
dup
iconst_2
9: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_3
10: aload 3
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
11: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
12: aload 2
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
13: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
14: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 15 1 performer Lorg/apache/cassandra/auth/AuthenticatedUser;
0 15 2 role Lorg/apache/cassandra/auth/RoleResource;
0 15 3 revokee Lorg/apache/cassandra/auth/RoleResource;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
performer
role
revokee
public java.util.Set<org.apache.cassandra.auth.RoleResource> getRoles(org.apache.cassandra.auth.RoleResource, boolean);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 3
start local 3 1: aload 0
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRole:(Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
astore 4
start local 4 2: aload 4
getstatic org.apache.cassandra.auth.CassandraRoleManager.NULL_ROLE:Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager$Role.equals:(Ljava/lang/Object;)Z
ifne 5
3: aload 3
aload 4
getfield org.apache.cassandra.auth.CassandraRoleManager$Role.name:Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
4: aload 0
aload 4
aload 3
iload 2
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.collectRoles:(Lorg/apache/cassandra/auth/CassandraRoleManager$Role;Ljava/util/Set;Z)V
5: StackMap locals: java.util.Set org.apache.cassandra.auth.CassandraRoleManager$Role
StackMap stack:
aload 3
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 6 1 grantee Lorg/apache/cassandra/auth/RoleResource;
0 6 2 includeInherited Z
1 6 3 roles Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;
2 6 4 role Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
Signature: (Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;
MethodParameters:
Name Flags
grantee
includeInherited
public java.util.Set<org.apache.cassandra.auth.RoleResource> getAllRoles();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
ldc "SELECT role from %s.%s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
ldc "system_auth"
aastore
dup
iconst_1
ldc "roles"
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
astore 1
start local 1 1: aload 1
new org.apache.cassandra.auth.CassandraRoleManager$3
dup
aload 0
invokespecial org.apache.cassandra.auth.CassandraRoleManager$3.<init>:(Lorg/apache/cassandra/auth/CassandraRoleManager;)V
invokestatic com.google.common.collect.Iterables.transform:(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;
astore 2
start local 2 2: invokestatic com.google.common.collect.ImmutableSet.builder:()Lcom/google/common/collect/ImmutableSet$Builder;
aload 2
invokevirtual com.google.common.collect.ImmutableSet$Builder.addAll:(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableSet$Builder;
invokevirtual com.google.common.collect.ImmutableSet$Builder.build:()Lcom/google/common/collect/ImmutableSet;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
1 3 1 rows Lorg/apache/cassandra/cql3/UntypedResultSet;
2 3 2 roles Ljava/lang/Iterable<Lorg/apache/cassandra/auth/RoleResource;>;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
Signature: ()Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;
public boolean isSuper(org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRole:(Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
getfield org.apache.cassandra.auth.CassandraRoleManager$Role.isSuper:Z
1: ireturn
2: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestExecutionException
astore 2
start local 2 3: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Failed to authorize {} for super-user permission"
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;)V
4: new org.apache.cassandra.exceptions.UnauthorizedException
dup
new java.lang.StringBuilder
dup
ldc "Unable to perform authorization of super-user permission: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual org.apache.cassandra.exceptions.RequestExecutionException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 2
invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 5 1 role Lorg/apache/cassandra/auth/RoleResource;
3 5 2 e Lorg/apache/cassandra/exceptions/RequestExecutionException;
Exception table:
from to target type
0 1 2 Class org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
role
public boolean canLogin(org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRole:(Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
getfield org.apache.cassandra.auth.CassandraRoleManager$Role.canLogin:Z
1: ireturn
2: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestExecutionException
astore 2
start local 2 3: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Failed to authorize {} for login permission"
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;)V
4: new org.apache.cassandra.exceptions.UnauthorizedException
dup
new java.lang.StringBuilder
dup
ldc "Unable to perform authorization of login permission: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual org.apache.cassandra.exceptions.RequestExecutionException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 2
invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 5 1 role Lorg/apache/cassandra/auth/RoleResource;
3 5 2 e Lorg/apache/cassandra/exceptions/RequestExecutionException;
Exception table:
from to target type
0 1 2 Class org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
role
public java.util.Map<java.lang.String, java.lang.String> getCustomOptions(org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;)Ljava/util/Map;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: invokestatic java.util.Collections.emptyMap:()Ljava/util/Map;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 1 1 role Lorg/apache/cassandra/auth/RoleResource;
Signature: (Lorg/apache/cassandra/auth/RoleResource;)Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
MethodParameters:
Name Flags
role
public boolean isExistingRole(org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRole:(Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
getstatic org.apache.cassandra.auth.CassandraRoleManager.NULL_ROLE:Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
if_acmpeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 2 1 role Lorg/apache/cassandra/auth/RoleResource;
MethodParameters:
Name Flags
role
public java.util.Set<? extends org.apache.cassandra.auth.IResource> protectedResources();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: ldc "system_auth"
ldc "roles"
invokestatic org.apache.cassandra.auth.DataResource.table:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/auth/DataResource;
1: ldc "system_auth"
ldc "role_members"
invokestatic org.apache.cassandra.auth.DataResource.table:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/auth/DataResource;
2: invokestatic com.google.common.collect.ImmutableSet.of:(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
Signature: ()Ljava/util/Set<+Lorg/apache/cassandra/auth/IResource;>;
public void validateConfiguration();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
Exceptions:
throws org.apache.cassandra.exceptions.ConfigurationException
private static void setupDefaultRole();
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=0
0: getstatic org.apache.cassandra.service.StorageService.instance:Lorg/apache/cassandra/service/StorageService;
invokevirtual org.apache.cassandra.service.StorageService.getTokenMetadata:()Lorg/apache/cassandra/locator/TokenMetadata;
invokevirtual org.apache.cassandra.locator.TokenMetadata.sortedTokens:()Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.isEmpty:()Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "CassandraRoleManager skipped default role setup: no known tokens in ring"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
invokestatic org.apache.cassandra.auth.CassandraRoleManager.hasExistingRoles:()Z
ifne 16
3: ldc "INSERT INTO %s.%s (role, is_superuser, can_login, salted_hash) VALUES ('%s', true, true, '%s')"
iconst_4
anewarray java.lang.Object
dup
iconst_0
4: ldc "system_auth"
aastore
dup
iconst_1
5: ldc "roles"
aastore
dup
iconst_2
6: ldc "cassandra"
aastore
dup
iconst_3
7: ldc "cassandra"
invokestatic org.apache.cassandra.auth.CassandraRoleManager.hashpw:(Ljava/lang/String;)Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
8: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
9: ldc "cassandra"
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
10: invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
11: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Created default superuser role '{}'"
ldc "cassandra"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
12: goto 16
13: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestExecutionException
astore 0
start local 0 14: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "CassandraRoleManager skipped default role setup: some nodes were not ready"
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
15: aload 0
athrow
end local 0 16: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
14 16 0 e Lorg/apache/cassandra/exceptions/RequestExecutionException;
Exception table:
from to target type
2 12 13 Class org.apache.cassandra.exceptions.RequestExecutionException
private static boolean hasExistingRoles();
descriptor: ()Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=0
0: ldc "SELECT * FROM %s.%s WHERE role = '%s'"
iconst_3
anewarray java.lang.Object
dup
iconst_0
ldc "system_auth"
aastore
dup
iconst_1
ldc "roles"
aastore
dup
iconst_2
ldc "cassandra"
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 0
start local 0 1: ldc "SELECT * FROM %s.%s LIMIT 1"
iconst_2
anewarray java.lang.Object
dup
iconst_0
ldc "system_auth"
aastore
dup
iconst_1
ldc "roles"
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 1
start local 1 2: aload 0
getstatic org.apache.cassandra.db.ConsistencyLevel.ONE:Lorg/apache/cassandra/db/ConsistencyLevel;
invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.isEmpty:()Z
ifeq 6
3: aload 0
getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.isEmpty:()Z
ifeq 6
4: aload 1
getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.isEmpty:()Z
ifeq 6
5: iconst_0
ireturn
StackMap locals: java.lang.String java.lang.String
StackMap stack:
6: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 7 0 defaultSUQuery Ljava/lang/String;
2 7 1 allUsersQuery Ljava/lang/String;
Exceptions:
throws org.apache.cassandra.exceptions.RequestExecutionException
private void scheduleSetupTask(java.util.concurrent.Callable<java.lang.Void>);
descriptor: (Ljava/util/concurrent/Callable;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.concurrent.ScheduledExecutors.optionalTasks:Lorg/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor;
new org.apache.cassandra.auth.CassandraRoleManager$4
dup
aload 0
aload 1
invokespecial org.apache.cassandra.auth.CassandraRoleManager$4.<init>:(Lorg/apache/cassandra/auth/CassandraRoleManager;Ljava/util/concurrent/Callable;)V
1: getstatic org.apache.cassandra.auth.AuthKeyspace.SUPERUSER_SETUP_DELAY:J
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
2: invokevirtual org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor.schedule:(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
pop
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 4 1 setupTask Ljava/util/concurrent/Callable<Ljava/lang/Void;>;
Signature: (Ljava/util/concurrent/Callable<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
setupTask final
private void convertLegacyData();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=1
start local 0 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
ldc "system_auth"
ldc "users"
invokevirtual org.apache.cassandra.config.Schema.getCFMetaData:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
ifnull 13
1: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Converting legacy users"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
2: ldc "SELECT * FROM system_auth.users"
3: getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
4: invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
astore 1
start local 1 5: aload 1
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.iterator:()Ljava/util/Iterator;
astore 3
goto 11
StackMap locals: org.apache.cassandra.auth.CassandraRoleManager org.apache.cassandra.cql3.UntypedResultSet top java.util.Iterator
StackMap stack:
6: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.UntypedResultSet$Row
astore 2
start local 2 7: new org.apache.cassandra.auth.RoleOptions
dup
invokespecial org.apache.cassandra.auth.RoleOptions.<init>:()V
astore 4
start local 4 8: aload 4
getstatic org.apache.cassandra.auth.IRoleManager$Option.SUPERUSER:Lorg/apache/cassandra/auth/IRoleManager$Option;
aload 2
ldc "super"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getBoolean:(Ljava/lang/String;)Z
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual org.apache.cassandra.auth.RoleOptions.setOption:(Lorg/apache/cassandra/auth/IRoleManager$Option;Ljava/lang/Object;)V
9: aload 4
getstatic org.apache.cassandra.auth.IRoleManager$Option.LOGIN:Lorg/apache/cassandra/auth/IRoleManager$Option;
iconst_1
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual org.apache.cassandra.auth.RoleOptions.setOption:(Lorg/apache/cassandra/auth/IRoleManager$Option;Ljava/lang/Object;)V
10: aload 0
aconst_null
aload 2
ldc "name"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getString:(Ljava/lang/String;)Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
aload 4
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.createRole:(Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleOptions;)V
end local 4 end local 2 11: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
12: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Completed conversion of legacy users"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
end local 1 13: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager
StackMap stack:
getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
ldc "system_auth"
ldc "credentials"
invokevirtual org.apache.cassandra.config.Schema.getCFMetaData:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
ifnull 35
14: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Migrating legacy credentials data to new system table"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
15: ldc "SELECT * FROM system_auth.credentials"
16: getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
17: invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
astore 1
start local 1 18: aload 1
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.iterator:()Ljava/util/Iterator;
astore 3
goto 28
StackMap locals: org.apache.cassandra.auth.CassandraRoleManager org.apache.cassandra.cql3.UntypedResultSet top java.util.Iterator
StackMap stack:
19: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.UntypedResultSet$Row
astore 2
start local 2 20: ldc "UPDATE %s.%s SET salted_hash = '%s' WHERE role = '%s'"
iconst_4
anewarray java.lang.Object
dup
iconst_0
21: ldc "system_auth"
aastore
dup
iconst_1
22: ldc "roles"
aastore
dup
iconst_2
23: aload 2
ldc "salted_hash"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getString:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_3
24: aload 2
ldc "username"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getString:(Ljava/lang/String;)Ljava/lang/String;
aastore
25: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
26: aload 2
ldc "username"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getString:(Ljava/lang/String;)Ljava/lang/String;
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
27: invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
end local 2 28: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 19
29: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Completed conversion of legacy credentials"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
end local 1 30: goto 35
31: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager
StackMap stack: java.lang.Exception
astore 1
start local 1 32: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Unable to complete conversion of legacy auth data (perhaps not enough nodes are upgraded yet). Conversion should not be considered complete"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
33: getstatic org.apache.cassandra.auth.CassandraRoleManager.logger:Lorg/slf4j/Logger;
ldc "Conversion error"
aload 1
invokeinterface org.slf4j.Logger.trace:(Ljava/lang/String;Ljava/lang/Throwable;)V
34: aload 1
athrow
end local 1 35: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
5 13 1 users Lorg/apache/cassandra/cql3/UntypedResultSet;
7 11 2 row Lorg/apache/cassandra/cql3/UntypedResultSet$Row;
8 11 4 options Lorg/apache/cassandra/auth/RoleOptions;
18 30 1 credentials Lorg/apache/cassandra/cql3/UntypedResultSet;
20 28 2 row Lorg/apache/cassandra/cql3/UntypedResultSet$Row;
32 35 1 e Ljava/lang/Exception;
Exception table:
from to target type
0 30 31 Class java.lang.Exception
Exceptions:
throws java.lang.Exception
private org.apache.cassandra.cql3.statements.SelectStatement prepareLegacySelectUserStatement();
descriptor: ()Lorg/apache/cassandra/cql3/statements/SelectStatement;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
ldc "SELECT * FROM %s.%s WHERE name = ?"
1: ldc "system_auth"
2: ldc "users"
3: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.prepare:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/cql3/CQLStatement;
checkcast org.apache.cassandra.cql3.statements.SelectStatement
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
private org.apache.cassandra.cql3.CQLStatement prepare(java.lang.String, java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/cql3/CQLStatement;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 2
aastore
dup
iconst_1
aload 3
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic org.apache.cassandra.cql3.QueryProcessor.parseStatement:(Ljava/lang/String;)Lorg/apache/cassandra/cql3/statements/ParsedStatement;
invokestatic org.apache.cassandra.service.ClientState.forInternalCalls:()Lorg/apache/cassandra/service/ClientState;
invokevirtual org.apache.cassandra.cql3.statements.ParsedStatement.prepare:(Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/cql3/statements/ParsedStatement$Prepared;
getfield org.apache.cassandra.cql3.statements.ParsedStatement$Prepared.statement:Lorg/apache/cassandra/cql3/CQLStatement;
1: areturn
2: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestValidationException
astore 4
start local 4 3: new java.lang.AssertionError
dup
aload 4
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 4 1 template Ljava/lang/String;
0 4 2 keyspace Ljava/lang/String;
0 4 3 table Ljava/lang/String;
3 4 4 e Lorg/apache/cassandra/exceptions/RequestValidationException;
Exception table:
from to target type
0 1 2 Class org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
template
keyspace
table
private void collectRoles(org.apache.cassandra.auth.CassandraRoleManager$Role, java.util.Set<org.apache.cassandra.auth.RoleResource>, );
descriptor: (Lorg/apache/cassandra/auth/CassandraRoleManager$Role;Ljava/util/Set;Z)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
getfield org.apache.cassandra.auth.CassandraRoleManager$Role.memberOf:Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: org.apache.cassandra.auth.CassandraRoleManager org.apache.cassandra.auth.CassandraRoleManager$Role java.util.Set int top java.util.Iterator
StackMap stack:
1: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 2: aload 0
aload 4
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRole:(Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
astore 6
start local 6 3: aload 6
getstatic org.apache.cassandra.auth.CassandraRoleManager.NULL_ROLE:Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager$Role.equals:(Ljava/lang/Object;)Z
ifeq 5
4: goto 8
5: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager org.apache.cassandra.auth.CassandraRoleManager$Role java.util.Set int java.lang.String java.util.Iterator org.apache.cassandra.auth.CassandraRoleManager$Role
StackMap stack:
aload 2
aload 6
getfield org.apache.cassandra.auth.CassandraRoleManager$Role.name:Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
6: iload 3
ifeq 8
7: aload 0
aload 6
aload 2
iconst_1
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.collectRoles:(Lorg/apache/cassandra/auth/CassandraRoleManager$Role;Ljava/util/Set;Z)V
end local 6 end local 4 8: StackMap locals: org.apache.cassandra.auth.CassandraRoleManager org.apache.cassandra.auth.CassandraRoleManager$Role java.util.Set int top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
9: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 10 1 role Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
0 10 2 collected Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;
0 10 3 includeInherited Z
2 8 4 memberOf Ljava/lang/String;
3 8 6 granted Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
Signature: (Lorg/apache/cassandra/auth/CassandraRoleManager$Role;Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;Z)V
MethodParameters:
Name Flags
role
collected
includeInherited
private org.apache.cassandra.auth.CassandraRoleManager$Role getRole(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
ldc "system_auth"
ldc "users"
invokevirtual org.apache.cassandra.config.Schema.getCFMetaData:(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/config/CFMetaData;
ifnonnull 2
1: aload 0
aload 1
aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.loadRoleStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
getstatic org.apache.cassandra.auth.CassandraRoleManager.ROW_TO_ROLE:Lcom/google/common/base/Function;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRoleFromTable:(Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/SelectStatement;Lcom/google/common/base/Function;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.legacySelectUserStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
ifnonnull 4
3: aload 0
aload 0
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.prepareLegacySelectUserStatement:()Lorg/apache/cassandra/cql3/statements/SelectStatement;
putfield org.apache.cassandra.auth.CassandraRoleManager.legacySelectUserStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
4: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.legacySelectUserStatement:Lorg/apache/cassandra/cql3/statements/SelectStatement;
getstatic org.apache.cassandra.auth.CassandraRoleManager.LEGACY_ROW_TO_ROLE:Lcom/google/common/base/Function;
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.getRoleFromTable:(Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/SelectStatement;Lcom/google/common/base/Function;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 5 1 name Ljava/lang/String;
MethodParameters:
Name Flags
name
private org.apache.cassandra.auth.CassandraRoleManager$Role getRoleFromTable(java.lang.String, org.apache.cassandra.cql3.statements.SelectStatement, com.google.common.base.Function<org.apache.cassandra.cql3.UntypedResultSet$Row, org.apache.cassandra.auth.CassandraRoleManager$Role>);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/SelectStatement;Lcom/google/common/base/Function;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
invokestatic org.apache.cassandra.service.QueryState.forInternalCalls:()Lorg/apache/cassandra/service/QueryState;
1: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
2: aload 1
invokestatic org.apache.cassandra.utils.ByteBufferUtil.bytes:(Ljava/lang/String;)Ljava/nio/ByteBuffer;
invokestatic java.util.Collections.singletonList:(Ljava/lang/Object;)Ljava/util/List;
3: invokestatic org.apache.cassandra.cql3.QueryOptions.forInternalCalls:(Lorg/apache/cassandra/db/ConsistencyLevel;Ljava/util/List;)Lorg/apache/cassandra/cql3/QueryOptions;
4: invokestatic java.lang.System.nanoTime:()J
5: invokevirtual org.apache.cassandra.cql3.statements.SelectStatement.execute:(Lorg/apache/cassandra/service/QueryState;Lorg/apache/cassandra/cql3/QueryOptions;J)Lorg/apache/cassandra/transport/messages/ResultMessage$Rows;
6: astore 4
start local 4 7: aload 4
getfield org.apache.cassandra.transport.messages.ResultMessage$Rows.result:Lorg/apache/cassandra/cql3/ResultSet;
invokevirtual org.apache.cassandra.cql3.ResultSet.isEmpty:()Z
ifeq 9
8: getstatic org.apache.cassandra.auth.CassandraRoleManager.NULL_ROLE:Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
areturn
9: StackMap locals: org.apache.cassandra.transport.messages.ResultMessage$Rows
StackMap stack:
aload 3
aload 4
getfield org.apache.cassandra.transport.messages.ResultMessage$Rows.result:Lorg/apache/cassandra/cql3/ResultSet;
invokestatic org.apache.cassandra.cql3.UntypedResultSet.create:(Lorg/apache/cassandra/cql3/ResultSet;)Lorg/apache/cassandra/cql3/UntypedResultSet;
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.one:()Lorg/apache/cassandra/cql3/UntypedResultSet$Row;
invokeinterface com.google.common.base.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.apache.cassandra.auth.CassandraRoleManager$Role
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 10 1 name Ljava/lang/String;
0 10 2 statement Lorg/apache/cassandra/cql3/statements/SelectStatement;
0 10 3 function Lcom/google/common/base/Function<Lorg/apache/cassandra/cql3/UntypedResultSet$Row;Lorg/apache/cassandra/auth/CassandraRoleManager$Role;>;
7 10 4 rows Lorg/apache/cassandra/transport/messages/ResultMessage$Rows;
Exceptions:
throws org.apache.cassandra.exceptions.RequestExecutionException, org.apache.cassandra.exceptions.RequestValidationException
Signature: (Ljava/lang/String;Lorg/apache/cassandra/cql3/statements/SelectStatement;Lcom/google/common/base/Function<Lorg/apache/cassandra/cql3/UntypedResultSet$Row;Lorg/apache/cassandra/auth/CassandraRoleManager$Role;>;)Lorg/apache/cassandra/auth/CassandraRoleManager$Role;
MethodParameters:
Name Flags
name
statement
function
private void modifyRoleMembership(java.lang.String, java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
ldc "UPDATE %s.%s SET member_of = member_of %s {'%s'} WHERE role = '%s'"
iconst_5
anewarray java.lang.Object
dup
iconst_0
1: ldc "system_auth"
aastore
dup
iconst_1
2: ldc "roles"
aastore
dup
iconst_2
3: aload 3
aastore
dup
iconst_3
4: aload 2
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
dup
iconst_4
5: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
6: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
7: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
8: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
9: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 10 1 grantee Ljava/lang/String;
0 10 2 role Ljava/lang/String;
0 10 3 op Ljava/lang/String;
Exceptions:
throws org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
grantee
role
op
private void removeAllMembers(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 0
ldc "SELECT member FROM %s.%s WHERE role = '%s'"
iconst_3
anewarray java.lang.Object
dup
iconst_0
1: ldc "system_auth"
aastore
dup
iconst_1
2: ldc "role_members"
aastore
dup
iconst_2
3: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
4: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
5: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
6: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
astore 2
start local 2 7: aload 2
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.isEmpty:()Z
ifeq 9
8: return
9: StackMap locals: org.apache.cassandra.cql3.UntypedResultSet
StackMap stack:
aload 2
invokevirtual org.apache.cassandra.cql3.UntypedResultSet.iterator:()Ljava/util/Iterator;
astore 4
goto 12
StackMap locals: org.apache.cassandra.auth.CassandraRoleManager java.lang.String org.apache.cassandra.cql3.UntypedResultSet top java.util.Iterator
StackMap stack:
10: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.UntypedResultSet$Row
astore 3
start local 3 11: aload 0
aload 3
ldc "member"
invokevirtual org.apache.cassandra.cql3.UntypedResultSet$Row.getString:(Ljava/lang/String;)Ljava/lang/String;
aload 1
ldc "-"
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.modifyRoleMembership:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
end local 3 12: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 10
13: aload 0
ldc "DELETE FROM %s.%s WHERE role = '%s'"
iconst_3
anewarray java.lang.Object
dup
iconst_0
14: ldc "system_auth"
aastore
dup
iconst_1
15: ldc "role_members"
aastore
dup
iconst_2
16: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.escape:(Ljava/lang/String;)Ljava/lang/String;
aastore
17: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
18: aload 1
invokestatic org.apache.cassandra.auth.CassandraRoleManager.consistencyForRole:(Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
19: invokevirtual org.apache.cassandra.auth.CassandraRoleManager.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
pop
20: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 21 1 role Ljava/lang/String;
7 21 2 rows Lorg/apache/cassandra/cql3/UntypedResultSet;
11 12 3 row Lorg/apache/cassandra/cql3/UntypedResultSet$Row;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
role
private java.lang.Iterable<java.lang.String> optionsToAssignments(java.util.Map<org.apache.cassandra.auth.IRoleManager$Option, java.lang.Object>);
descriptor: (Ljava/util/Map;)Ljava/lang/Iterable;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
1: new org.apache.cassandra.auth.CassandraRoleManager$5
dup
aload 0
invokespecial org.apache.cassandra.auth.CassandraRoleManager$5.<init>:(Lorg/apache/cassandra/auth/CassandraRoleManager;)V
2: invokestatic com.google.common.collect.Iterables.transform:(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 3 1 options Ljava/util/Map<Lorg/apache/cassandra/auth/IRoleManager$Option;Ljava/lang/Object;>;
Signature: (Ljava/util/Map<Lorg/apache/cassandra/auth/IRoleManager$Option;Ljava/lang/Object;>;)Ljava/lang/Iterable<Ljava/lang/String;>;
MethodParameters:
Name Flags
options
protected static org.apache.cassandra.db.ConsistencyLevel consistencyForRole(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/apache/cassandra/db/ConsistencyLevel;
flags: (0x000c) ACC_PROTECTED, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "cassandra"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 2
1: getstatic org.apache.cassandra.db.ConsistencyLevel.QUORUM:Lorg/apache/cassandra/db/ConsistencyLevel;
areturn
2: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.db.ConsistencyLevel.LOCAL_ONE:Lorg/apache/cassandra/db/ConsistencyLevel;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 role Ljava/lang/String;
MethodParameters:
Name Flags
role
private static java.lang.String hashpw(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getstatic org.apache.cassandra.auth.CassandraRoleManager.GENSALT_LOG2_ROUNDS:I
invokestatic org.mindrot.jbcrypt.BCrypt.gensalt:(I)Ljava/lang/String;
invokestatic org.mindrot.jbcrypt.BCrypt.hashpw:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 password Ljava/lang/String;
MethodParameters:
Name Flags
password
private static java.lang.String escape(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "'"
ldc "''"
invokestatic org.apache.commons.lang3.StringUtils.replace:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 name Ljava/lang/String;
MethodParameters:
Name Flags
name
private org.apache.cassandra.cql3.UntypedResultSet process(java.lang.String, org.apache.cassandra.db.ConsistencyLevel);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.apache.cassandra.auth.CassandraRoleManager.isClusterReady:Z
ifne 2
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot process role related query as the role manager isn't yet setup. This is likely because some of nodes in the cluster are on version 2.1 or earlier. You need to upgrade all nodes to Cassandra 2.2 or more to use roles."
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
aload 2
invokestatic org.apache.cassandra.cql3.QueryProcessor.process:(Ljava/lang/String;Lorg/apache/cassandra/db/ConsistencyLevel;)Lorg/apache/cassandra/cql3/UntypedResultSet;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
0 3 1 query Ljava/lang/String;
0 3 2 consistencyLevel Lorg/apache/cassandra/db/ConsistencyLevel;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
query
consistencyLevel
private java.lang.Void lambda$0();
descriptor: ()Ljava/lang/Void;
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.apache.cassandra.auth.CassandraRoleManager.convertLegacyData:()V
1: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/auth/CassandraRoleManager;
Exceptions:
throws java.lang.Exception
private static java.lang.Void lambda$1();
descriptor: ()Ljava/lang/Void;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic org.apache.cassandra.auth.CassandraRoleManager.setupDefaultRole:()V
1: aconst_null
areturn
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.lang.Exception
}
SourceFile: "CassandraRoleManager.java"
NestMembers:
org.apache.cassandra.auth.CassandraRoleManager$1 org.apache.cassandra.auth.CassandraRoleManager$2 org.apache.cassandra.auth.CassandraRoleManager$3 org.apache.cassandra.auth.CassandraRoleManager$4 org.apache.cassandra.auth.CassandraRoleManager$5 org.apache.cassandra.auth.CassandraRoleManager$Role
InnerClasses:
public Builder = com.google.common.collect.ImmutableSet$Builder of com.google.common.collect.ImmutableSet
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Entry = java.util.Map$Entry of java.util.Map
org.apache.cassandra.auth.CassandraRoleManager$1
org.apache.cassandra.auth.CassandraRoleManager$2
org.apache.cassandra.auth.CassandraRoleManager$3
org.apache.cassandra.auth.CassandraRoleManager$4
org.apache.cassandra.auth.CassandraRoleManager$5
private final Role = org.apache.cassandra.auth.CassandraRoleManager$Role of org.apache.cassandra.auth.CassandraRoleManager
public final Option = org.apache.cassandra.auth.IRoleManager$Option of org.apache.cassandra.auth.IRoleManager
public Row = org.apache.cassandra.cql3.UntypedResultSet$Row of org.apache.cassandra.cql3.UntypedResultSet
public Prepared = org.apache.cassandra.cql3.statements.ParsedStatement$Prepared of org.apache.cassandra.cql3.statements.ParsedStatement
public Rows = org.apache.cassandra.transport.messages.ResultMessage$Rows of org.apache.cassandra.transport.messages.ResultMessage