Repository navigation
Description
Description
Static roles already support a hidden flag (ADR 0023) that removes a role from normal discovery and selection interfaces without deleting it or changing permission checks. Permission categories and permissions have no equivalent. Operators and applications cannot keep a permission or category defined in the schema while omitting it from the catalog that UIs consume (for example, one that is deprecated, experimental, or not meant to be assigned directly).
Adding the same flag to categories and permissions lets deployments control what is surfaced in the role/permission catalog while keeping the definitions, existing role grants, and enforcement intact.
Current Behavior
hiddenis only supported on roles ($defs/roleand$defs/role_extensioninauthz-schema-v1.json) and persisted inAuthzRoleDefinition.hidden.permission_categoriesandpermissionsentries in the schema do not accepthidden, andAuthzPermissionCategory/AuthzPermissionDefinitionhave no such column.- The scope-type catalog endpoint (ADR 0028) returns every category and permission used by the requested scope types, regardless of whether they should be exposed.
Expected Behavior
- Categories and permissions accept an optional boolean
hiddenfield in the authorization schema (defaultfalse), with the same semantics as for roles: hidden items are omitted from normal discovery APIs and selection UIs, but are not deleted, do not lose existing role grants, and do not change permission checks. - The compiled schema, source tracking, and database persist the flag, and changing it is reported as an update when applying a schema.
- The role/permission catalog API omits hidden categories and hidden permissions (and does not return a category whose permissions are all hidden).
Acceptance Criteria
-
authz-schema-v1.jsonaccepts an optional booleanhidden(defaultfalse) on category and permission definitions, and the schema reference docs are regenerated. -
AuthzPermissionCategoryandAuthzPermissionDefinitionstorehidden, with a migration that defaults existing rows tofalse. - The schema compiler, storage, and
load_authz_schema/ apply reporting persist the flag and report a changedhiddenvalue as an update. - The catalog endpoint excludes hidden categories and hidden permissions, and the API contract is documented.
- Hiding a permission or category does not remove existing role-permission relationships and does not alter authorization checks.
- Behavior for a role that references a hidden permission is defined and covered by a test.
- Tests cover schema validation, persistence, clearing the flag, and catalog filtering.
- Documentation (ADR or ADR update, schema reference, CHANGELOG) is updated.
Related: ADR 0023 (hidden roles), ADR 0025 (source tracking), ADR 0028 (role catalog API contract).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity