Enum Class ControlPlaneRole
- All Implemented Interfaces:
Serializable,Comparable<ControlPlaneRole>,Constable
A coarse control-plane authorization role with a strict hierarchy:
ADMIN ⊇ MUTATE ⊇ READ. A principal granted a higher role
satisfies every requirement at or below it (an ADMIN can do anything a
MUTATE or READ principal can; a MUTATE principal can also
READ).
The role required by an operation is derived from the read/mutate split used by the
control plane (reads require READ; everything else — mutations — requires
MUTATE). ADMIN is the ceiling for future finer-grained admin-only
operations and currently behaves as a strict superset of MUTATE.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ControlPlaneRoleParses a role name case-insensitively (read / mutate / admin), tolerating surrounding whitespace.booleansatisfies(ControlPlaneRole required) static ControlPlaneRoleReturns the enum constant of this class with the specified name.static ControlPlaneRole[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ
-
MUTATE
-
ADMIN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
satisfies
- Returns:
- true if a principal granted THIS role is permitted to perform an
operation whose required role is
required(i.e. this role's rank is at least the required rank).ADMIN.satisfies(READ)is true;READ.satisfies(MUTATE)is false.
-
parse
Parses a role name case-insensitively (read / mutate / admin), tolerating surrounding whitespace. Returns null for a blank or unrecognised value so callers can fail closed (an unmappable role grants nothing).
-