apache/cassandra · error · UnsupportedOperationException

LIST PERMISSIONS operation is not supported by AllowAllAutho

Error message

LIST PERMISSIONS operation is not supported by AllowAllAuthorizer

What it means

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.

Source

Thrown at src/java/org/apache/cassandra/auth/AllowAllAuthorizer.java:56

        throw new UnsupportedOperationException("GRANT operation is not supported by AllowAllAuthorizer");
    }

    public Set<Permission> revoke(AuthenticatedUser performer, Set<Permission> permissions, IResource resource, RoleResource from)
    {
        throw new UnsupportedOperationException("REVOKE operation is not supported by AllowAllAuthorizer");
    }

    public void revokeAllFrom(RoleResource droppedRole)
    {
    }

    public void revokeAllOn(IResource droppedResource)
    {
    }

    public Set<PermissionDetails> list(AuthenticatedUser performer, Set<Permission> permissions, IResource resource, RoleResource of)
    {
        throw new UnsupportedOperationException("LIST PERMISSIONS operation is not supported by AllowAllAuthorizer");
    }

    public Set<IResource> protectedResources()
    {
        return Collections.emptySet();
    }

    public void validateConfiguration()
    {
    }

    public void setup()
    {
    }
}

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Remove the counter field from the type and use only non-counter types (int, bigint, etc.).
  2. Keep counters as top-level counter columns on a dedicated counter table instead of inside a UDT.
  3. If approximate counts are acceptable inside a UDT, use bigint and maintain the value with normal read-modify-write updates.

Example fix

// before
CREATE TYPE stats.metrics (hits counter, views bigint);
// after
CREATE TYPE stats.metrics (views bigint);
Defensive patterns

Strategy: validation

Validate before calling

if (fieldType.equalsIgnoreCase("counter"))
    throw new IllegalArgumentException("counter cannot be used in a user-defined type");

Prevention

When it happens

Trigger: Executing 'CREATE TYPE ks.t (hits counter, ...)' or including any CQL3Type.Raw field where isCounter() is true.

Common situations: 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.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/934bcf34f3df89b1. Report an issue: GitHub.