Skip to content

5.31.0 — 2026-11-16

← 5.31.1 | 5.30.0 → | ↑ 5.x series

Added

Adapters - Keycloak

  • Actor and Owner Helpers - Add get_authenticated_actor() and get_authenticated_actor_and_owner(). The combined helper returns (actor, owner) through the individual helpers and propagates authentication and ownership errors without returning partial results. The actor is the outermost delegated actor, or the authenticated user for direct requests. PR #588, issue #587.

Models - Ownership

  • Owner Claim Details - OwnerDTO carries the matching KeycloakUserInfoDTO in user or KeycloakOrganizationClaimDTO in organization, without additional Keycloak requests. The unmatched field is None. Supplied claims must match the owner kind and UUID.
  • Owner Kind Properties - Add read-only is_user and is_organization properties and field descriptions. The convenience properties are not included in JSON output.

Changed

Models - Authentication

  • DTO and UUID Field Names - Rename Owner to OwnerDTO without a compatibility alias, rename its uuid field to owner_uuid, and rename AuthenticatedUserDTO.user_id to user_uuid. Update imports, constructor arguments, attribute access, and serialized payload consumers accordingly.
  • UserInfo Subject Alias - Expose the string subject as KeycloakUserInfoDTO.user_uuid in Python while retaining sub for OIDC input and serialized UserInfo claims. Token and actor claim field names remain unchanged.
  • Enriched Owner Serialization - Owner JSON includes owner_uuid, type, user, and organization; the unmatched claim field is null. Return only the claims appropriate for a service's API. Ownership resolution still does not authorize an operation.

Tests

Tests - Keycloak

  • Actor, Ownership, and Alias Regressions - Update the existing BDD features for the renamed exports, schema descriptions, matching claim details and custom attributes, invalid claim identities, actor fallback and delegation, combined-helper errors, and OIDC wire aliases. All 323 scenarios across five auth, mapper, and DTO features passed with real Keycloak and Envoy, without exclusions.