{"record":{"id":"dbbc96c3b9a307c1","repo":"apache/cassandra","slug":"s","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/statements/ListPermissionsStatement.java","lineNumber":130,"sourceCode":"            throw new InvalidRequestException(String.format(\"%s doesn't exist\", resource));\n\n        if ((grantee != null) && !DatabaseDescriptor.getRoleManager().isExistingRole(grantee))\n            throw new InvalidRequestException(String.format(\"%s doesn't exist\", grantee));\n\n        Collections.sort(details);\n        return resultMessage(details);\n    }\n\n    private Set<PermissionDetails> list(ClientState state, IResource resource)\n    throws RequestValidationException, RequestExecutionException\n    {\n        try\n        {\n            return DatabaseDescriptor.getAuthorizer().list(state.getUser(), permissions, resource, grantee);\n        }\n        catch (UnsupportedOperationException e)\n        {\n            throw new InvalidRequestException(e.getMessage());\n        }\n    }\n\n    private ResultMessage resultMessage(List<PermissionDetails> details)\n    {\n        if (details.isEmpty())\n            return new ResultMessage.Void();\n\n        ResultSet.ResultMetadata resultMetadata = new ResultSet.ResultMetadata(metadata);\n        ResultSet result = new ResultSet(resultMetadata);\n        for (PermissionDetails pd : details)\n        {\n            result.addColumnValue(UTF8Type.instance.decompose(pd.grantee));\n            result.addColumnValue(UTF8Type.instance.decompose(pd.grantee));\n            result.addColumnValue(UTF8Type.instance.decompose(pd.resource.toString()));\n            result.addColumnValue(UTF8Type.instance.decompose(pd.permission.toString()));\n        }\n        return new ResultMessage.Rows(result);","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/statements/ListPermissionsStatement.java#L112-L148","documentation":"If the configured IAuthorizer does not support listing permissions, it signals this by throwing UnsupportedOperationException from its list() method; Cassandra converts it to an InvalidRequestException carrying the authorizer's message. This happens with authorizer implementations like AllowAllAuthorizer or custom ones lacking LIST support.","triggerScenarios":"Calling LIST PERMISSIONS (any variant) while the authorizer (cassandra.yaml authorizer setting, e.g. AllowAllAuthorizer or a minimal custom IAuthorizer) throws UnsupportedOperationException from list().","commonSituations":"Clusters still on default AllowAllAuthorizer where someone runs LIST PERMISSIONS; after migrating authorizers without restarting all nodes; custom authorizer implementations that never implemented list().","solutions":["Configure a list-capable authorizer such as CassandraAuthorizer in cassandra.yaml and restart","Implement list() in your custom IAuthorizer instead of throwing UnsupportedOperationException","Check the authorizer's message in the exception for the exact unsupported capability"],"exampleFix":"// cassandra.yaml\n// before\nauthorizer: AllowAllAuthorizer\n// after\nauthorizer: CassandraAuthorizer","handlingStrategy":"validation","validationCode":"// only CassandraAuthorizer (or custom impls overriding list) supports LIST PERMISSIONS\nif (!config.getAuthorizer().equals(\"CassandraAuthorizer\")) throw new IllegalStateException(\"LIST PERMISSIONS requires a list-capable authorizer, got \" + config.getAuthorizer());","typeGuard":null,"tryCatchPattern":"try { session.execute(\"LIST ALL PERMISSIONS\"); } catch (InvalidRequestException e) { log.error(\"authorizer does not support listing: {}\", e.getMessage()); }","preventionTips":["Set authorizer: CassandraAuthorizer in cassandra.yaml for permission auditing","Implement list() in any custom IAuthorizer","Restart nodes after changing the authorizer setting"],"tags":["cassandra","cql","authorizer","unsupported-operation","configuration"],"backgroundTag":"unsupported-operation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}