public class org.apache.cassandra.cql3.statements.ListRolesStatement extends org.apache.cassandra.cql3.statements.AuthorizationStatement
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.cql3.statements.ListRolesStatement
super_class: org.apache.cassandra.cql3.statements.AuthorizationStatement
{
private static final java.lang.String KS;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "system_auth"
private static final java.lang.String CF;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "roles"
private static final org.apache.cassandra.db.marshal.MapType optionsType;
descriptor: Lorg/apache/cassandra/db/marshal/MapType;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.List<org.apache.cassandra.cql3.ColumnSpecification> metadata;
descriptor: Ljava/util/List;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/List<Lorg/apache/cassandra/cql3/ColumnSpecification;>;
private final org.apache.cassandra.auth.RoleResource grantee;
descriptor: Lorg/apache/cassandra/auth/RoleResource;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean recursive;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=11, locals=0, args_size=0
0: getstatic org.apache.cassandra.db.marshal.UTF8Type.instance:Lorg/apache/cassandra/db/marshal/UTF8Type;
getstatic org.apache.cassandra.db.marshal.UTF8Type.instance:Lorg/apache/cassandra/db/marshal/UTF8Type;
iconst_0
invokestatic org.apache.cassandra.db.marshal.MapType.getInstance:(Lorg/apache/cassandra/db/marshal/AbstractType;Lorg/apache/cassandra/db/marshal/AbstractType;Z)Lorg/apache/cassandra/db/marshal/MapType;
putstatic org.apache.cassandra.cql3.statements.ListRolesStatement.optionsType:Lorg/apache/cassandra/db/marshal/MapType;
1: new org.apache.cassandra.cql3.ColumnSpecification
dup
ldc "system_auth"
ldc "roles"
new org.apache.cassandra.cql3.ColumnIdentifier
dup
ldc "role"
iconst_1
invokespecial org.apache.cassandra.cql3.ColumnIdentifier.<init>:(Ljava/lang/String;Z)V
getstatic org.apache.cassandra.db.marshal.UTF8Type.instance:Lorg/apache/cassandra/db/marshal/UTF8Type;
invokespecial org.apache.cassandra.cql3.ColumnSpecification.<init>:(Ljava/lang/String;Ljava/lang/String;Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/db/marshal/AbstractType;)V
2: new org.apache.cassandra.cql3.ColumnSpecification
dup
ldc "system_auth"
ldc "roles"
new org.apache.cassandra.cql3.ColumnIdentifier
dup
ldc "super"
iconst_1
invokespecial org.apache.cassandra.cql3.ColumnIdentifier.<init>:(Ljava/lang/String;Z)V
getstatic org.apache.cassandra.db.marshal.BooleanType.instance:Lorg/apache/cassandra/db/marshal/BooleanType;
invokespecial org.apache.cassandra.cql3.ColumnSpecification.<init>:(Ljava/lang/String;Ljava/lang/String;Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/db/marshal/AbstractType;)V
3: new org.apache.cassandra.cql3.ColumnSpecification
dup
ldc "system_auth"
ldc "roles"
new org.apache.cassandra.cql3.ColumnIdentifier
dup
ldc "login"
iconst_1
invokespecial org.apache.cassandra.cql3.ColumnIdentifier.<init>:(Ljava/lang/String;Z)V
getstatic org.apache.cassandra.db.marshal.BooleanType.instance:Lorg/apache/cassandra/db/marshal/BooleanType;
invokespecial org.apache.cassandra.cql3.ColumnSpecification.<init>:(Ljava/lang/String;Ljava/lang/String;Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/db/marshal/AbstractType;)V
4: new org.apache.cassandra.cql3.ColumnSpecification
dup
ldc "system_auth"
ldc "roles"
new org.apache.cassandra.cql3.ColumnIdentifier
dup
ldc "options"
iconst_1
invokespecial org.apache.cassandra.cql3.ColumnIdentifier.<init>:(Ljava/lang/String;Z)V
getstatic org.apache.cassandra.cql3.statements.ListRolesStatement.optionsType:Lorg/apache/cassandra/db/marshal/MapType;
invokespecial org.apache.cassandra.cql3.ColumnSpecification.<init>:(Ljava/lang/String;Ljava/lang/String;Lorg/apache/cassandra/cql3/ColumnIdentifier;Lorg/apache/cassandra/db/marshal/AbstractType;)V
5: invokestatic com.google.common.collect.ImmutableList.of:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
6: putstatic org.apache.cassandra.cql3.statements.ListRolesStatement.metadata:Ljava/util/List;
7: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new org.apache.cassandra.cql3.RoleName
dup
invokespecial org.apache.cassandra.cql3.RoleName.<init>:()V
iconst_0
invokespecial org.apache.cassandra.cql3.statements.ListRolesStatement.<init>:(Lorg/apache/cassandra/cql3/RoleName;Z)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
public void <init>(org.apache.cassandra.cql3.RoleName, boolean);
descriptor: (Lorg/apache/cassandra/cql3/RoleName;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial org.apache.cassandra.cql3.statements.AuthorizationStatement.<init>:()V
1: aload 0
aload 1
invokevirtual org.apache.cassandra.cql3.RoleName.hasName:()Z
ifeq 2
aload 1
invokevirtual org.apache.cassandra.cql3.RoleName.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
goto 3
StackMap locals: org.apache.cassandra.cql3.statements.ListRolesStatement org.apache.cassandra.cql3.RoleName int
StackMap stack: org.apache.cassandra.cql3.statements.ListRolesStatement
2: aconst_null
StackMap locals: org.apache.cassandra.cql3.statements.ListRolesStatement org.apache.cassandra.cql3.RoleName int
StackMap stack: org.apache.cassandra.cql3.statements.ListRolesStatement org.apache.cassandra.auth.RoleResource
3: putfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
4: aload 0
iload 2
putfield org.apache.cassandra.cql3.statements.ListRolesStatement.recursive:Z
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
0 6 1 grantee Lorg/apache/cassandra/cql3/RoleName;
0 6 2 recursive Z
MethodParameters:
Name Flags
grantee
recursive
public void validate(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.apache.cassandra.service.ClientState.ensureNotAnonymous:()V
1: aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
ifnull 3
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
ifne 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "%s doesn't exist"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
aastore
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
3: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
0 4 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException, org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=2, args_size=2
start local 0 start local 1 0: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
0 1 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
public org.apache.cassandra.transport.messages.ResultMessage execute(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/transport/messages/ResultMessage;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthorizer:()Lorg/apache/cassandra/auth/IAuthorizer;
1: aload 1
invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
invokestatic org.apache.cassandra.auth.RoleResource.root:()Lorg/apache/cassandra/auth/RoleResource;
invokeinterface org.apache.cassandra.auth.IAuthorizer.authorize:(Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/IResource;)Ljava/util/Set;
2: getstatic org.apache.cassandra.auth.Permission.DESCRIBE:Lorg/apache/cassandra/auth/Permission;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
3: istore 2
start local 2 4: iload 2
ifeq 8
5: aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
ifnonnull 7
6: aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
invokeinterface org.apache.cassandra.auth.IRoleManager.getAllRoles:()Ljava/util/Set;
invokevirtual org.apache.cassandra.cql3.statements.ListRolesStatement.resultMessage:(Ljava/util/Set;)Lorg/apache/cassandra/transport/messages/ResultMessage;
areturn
7: StackMap locals: int
StackMap stack:
aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.recursive:Z
invokeinterface org.apache.cassandra.auth.IRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
invokevirtual org.apache.cassandra.cql3.statements.ListRolesStatement.resultMessage:(Ljava/util/Set;)Lorg/apache/cassandra/transport/messages/ResultMessage;
areturn
8: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
astore 3
start local 3 9: aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
ifnonnull 11
10: aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 3
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.recursive:Z
invokeinterface org.apache.cassandra.auth.IRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
invokevirtual org.apache.cassandra.cql3.statements.ListRolesStatement.resultMessage:(Ljava/util/Set;)Lorg/apache/cassandra/transport/messages/ResultMessage;
areturn
11: StackMap locals: org.apache.cassandra.auth.RoleResource
StackMap stack:
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 3
iconst_1
invokeinterface org.apache.cassandra.auth.IRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 13
12: aload 0
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.recursive:Z
invokeinterface org.apache.cassandra.auth.IRoleManager.getRoles:(Lorg/apache/cassandra/auth/RoleResource;Z)Ljava/util/Set;
invokevirtual org.apache.cassandra.cql3.statements.ListRolesStatement.resultMessage:(Ljava/util/Set;)Lorg/apache/cassandra/transport/messages/ResultMessage;
areturn
13: StackMap locals:
StackMap stack:
new org.apache.cassandra.exceptions.UnauthorizedException
dup
ldc "You are not authorized to view roles granted to %s "
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.ListRolesStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
0 14 1 state Lorg/apache/cassandra/service/ClientState;
4 14 2 hasRootLevelSelect Z
9 14 3 currentUser Lorg/apache/cassandra/auth/RoleResource;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
state
private org.apache.cassandra.transport.messages.ResultMessage resultMessage(java.util.Set<org.apache.cassandra.auth.RoleResource>);
descriptor: (Ljava/util/Set;)Lorg/apache/cassandra/transport/messages/ResultMessage;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.Set.isEmpty:()Z
ifeq 2
1: new org.apache.cassandra.transport.messages.ResultMessage$Void
dup
invokespecial org.apache.cassandra.transport.messages.ResultMessage$Void.<init>:()V
areturn
2: StackMap locals:
StackMap stack:
aload 1
invokestatic com.google.common.collect.Lists.newArrayList:(Ljava/lang/Iterable;)Ljava/util/ArrayList;
astore 2
start local 2 3: aload 2
invokestatic java.util.Collections.sort:(Ljava/util/List;)V
4: aload 0
aload 2
invokevirtual org.apache.cassandra.cql3.statements.ListRolesStatement.formatResults:(Ljava/util/List;)Lorg/apache/cassandra/transport/messages/ResultMessage;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/cql3/statements/ListRolesStatement;
0 5 1 roles Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;
3 5 2 sorted Ljava/util/List<Lorg/apache/cassandra/auth/RoleResource;>;
Signature: (Ljava/util/Set<Lorg/apache/cassandra/auth/RoleResource;>;)Lorg/apache/cassandra/transport/messages/ResultMessage;
MethodParameters:
Name Flags
roles
protected org.apache.cassandra.transport.messages.ResultMessage formatResults(java.util.List<org.apache.cassandra.auth.RoleResource>);
descriptor: (Ljava/util/List;)Lorg/apache/cassandra/transport/messages/ResultMessage;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.cql3.ResultSet
dup
getstatic org.apache.cassandra.cql3.statements.ListRolesStatement.metadata:Ljava/util/List;
invokespecial org.apache.cassandra.cql3.ResultSet.<init>:(Ljava/util/List;)V
astore 2
start local 2 1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
astore 3
start local 3 2: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: org.apache.cassandra.cql3.statements.ListRolesStatement java.util.List org.apache.cassandra.cql3.ResultSet org.apache.cassandra.auth.IRoleManager top java.util.Iterator
StackMap stack:
3: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.auth.RoleResource
astore 4
start local 4 4: aload 2
getstatic org.apache.cassandra.db.marshal.UTF8Type.instance:Lorg/apache/cassandra/db/marshal/UTF8Type;
aload 4
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
invokevirtual org.apache.cassandra.db.marshal.UTF8Type.decompose:(Ljava/lang/Object;)Ljava/nio/ByteBuffer;
invokevirtual org.apache.cassandra.cql3.ResultSet.addColumnValue:(Ljava/nio/ByteBuffer;)V
5: aload 2
getstatic org.apache.cassandra.db.marshal.BooleanType.instance:Lorg/apache/cassandra/db/marshal/BooleanType;
aload 3
aload 4
invokeinterface org.apache.cassandra.auth.IRoleManager.isSuper:(Lorg/apache/cassandra/auth/RoleResource;)Z
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual org.apache.cassandra.db.marshal.BooleanType.decompose:(Ljava/lang/Object;)Ljava/nio/ByteBuffer;
invokevirtual org.apache.cassandra.cql3.ResultSet.addColumnValue:(Ljava/nio/ByteBuffer;)V
6: aload 2
getstatic org.apache.cassandra.db.marshal.BooleanType.instance:Lorg/apache/cassandra/db/marshal/BooleanType;
aload 3
aload 4
invokeinterface org.apache.cassandra.auth.IRoleManager.canLogin:(Lorg/apache/cassandra/auth/RoleResource;)Z
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
invokevirtual org.apache.cassandra.db.marshal.BooleanType.decompose:(Ljava/lang/Object;)Ljava/nio/ByteBuffer;
invokevirtual org.apache.cassandra.cql3.ResultSet.addColumnValue:(Ljava/nio/ByteBuffer;)V
7: aload 2
getstatic org.apache.cassandra.cql3.statements.ListRolesStatement.optionsType:Lorg/apache/cassandra/db/marshal/MapType;
aload 3
aload 4
invokeinterface org.apache.cassandra.auth.IRoleManager.getCustomOptions:(Lorg/apache/cassandra/auth/RoleResource;)Ljava/util/Map;
invokevirtual org.apache.cassandra.db.marshal.MapType.decompose:(Ljava/lang/Object;)Ljava/nio/ByteBuffer;
invokevirtual org.apache.cassandra.cql3.ResultSet.addColumnValue:(Ljava/nio/ByteBuffer;)V
end local 4 8: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
9: new org.apache.cassandra.transport.messages.ResultMessage$Rows
dup
aload 2
invokespecial org.apache.cassandra.transport.messages.ResultMessage$Rows.<init>:(Lorg/apache/cassandra/cql3/ResultSet;)V
areturn
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/cql3/statements/ListRolesStatement;
0 10 1 sortedRoles Ljava/util/List<Lorg/apache/cassandra/auth/RoleResource;>;
1 10 2 result Lorg/apache/cassandra/cql3/ResultSet;
2 10 3 roleManager Lorg/apache/cassandra/auth/IRoleManager;
4 8 4 role Lorg/apache/cassandra/auth/RoleResource;
Signature: (Ljava/util/List<Lorg/apache/cassandra/auth/RoleResource;>;)Lorg/apache/cassandra/transport/messages/ResultMessage;
MethodParameters:
Name Flags
sortedRoles
}
SourceFile: "ListRolesStatement.java"
InnerClasses:
public Rows = org.apache.cassandra.transport.messages.ResultMessage$Rows of org.apache.cassandra.transport.messages.ResultMessage
public Void = org.apache.cassandra.transport.messages.ResultMessage$Void of org.apache.cassandra.transport.messages.ResultMessage