{"record":{"id":"934bcf34f3df89b1","repo":"apache/cassandra","slug":"list-permissions-operation-is-not-supported-by-all","errorCode":null,"errorMessage":"LIST PERMISSIONS operation is not supported by AllowAllAuthorizer","messagePattern":"LIST PERMISSIONS operation is not supported by AllowAllAuthorizer","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/auth/AllowAllAuthorizer.java","lineNumber":56,"sourceCode":"        throw new UnsupportedOperationException(\"GRANT operation is not supported by AllowAllAuthorizer\");\n    }\n\n    public Set<Permission> revoke(AuthenticatedUser performer, Set<Permission> permissions, IResource resource, RoleResource from)\n    {\n        throw new UnsupportedOperationException(\"REVOKE operation is not supported by AllowAllAuthorizer\");\n    }\n\n    public void revokeAllFrom(RoleResource droppedRole)\n    {\n    }\n\n    public void revokeAllOn(IResource droppedResource)\n    {\n    }\n\n    public Set<PermissionDetails> list(AuthenticatedUser performer, Set<Permission> permissions, IResource resource, RoleResource of)\n    {\n        throw new UnsupportedOperationException(\"LIST PERMISSIONS operation is not supported by AllowAllAuthorizer\");\n    }\n\n    public Set<IResource> protectedResources()\n    {\n        return Collections.emptySet();\n    }\n\n    public void validateConfiguration()\n    {\n    }\n\n    public void setup()\n    {\n    }\n}\n","sourceCodeStart":38,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/auth/AllowAllAuthorizer.java#L38-L72","documentation":"Thrown by CreateTypeStatement.apply when a field of the new user-defined type is declared with the counter type. Cassandra counters are implemented as special counter columns with distributed update semantics that cannot be embedded inside a user-defined type, so such DDL is rejected.","triggerScenarios":"Executing 'CREATE TYPE ks.t (hits counter, ...)' or including any CQL3Type.Raw field where isCounter() is true.","commonSituations":"Modeling stats aggregates as reusable struct types; converting an existing counter table's columns into a UDT during a refactor; code generators that naively map all column types to UDT fields.","solutions":["Remove the counter field from the type and use only non-counter types (int, bigint, etc.).","Keep counters as top-level counter columns on a dedicated counter table instead of inside a UDT.","If approximate counts are acceptable inside a UDT, use bigint and maintain the value with normal read-modify-write updates."],"exampleFix":"// before\nCREATE TYPE stats.metrics (hits counter, views bigint);\n// after\nCREATE TYPE stats.metrics (views bigint);","handlingStrategy":"validation","validationCode":"if (fieldType.equalsIgnoreCase(\"counter\"))\n    throw new IllegalArgumentException(\"counter cannot be used in a user-defined type\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never model counters as UDT fields; keep them as counter table columns.","Filter counter columns out of any table-to-UDT type generator.","Review Cassandra UDT restrictions (no counters, nested UDTs must be frozen) before designing types."],"tags":["cassandra","cql","ddl","user-type","counter"],"backgroundTag":"schema-validation-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}