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()andget_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 -
OwnerDTOcarries the matchingKeycloakUserInfoDTOinuserorKeycloakOrganizationClaimDTOinorganization, without additional Keycloak requests. The unmatched field isNone. Supplied claims must match the owner kind and UUID. - Owner Kind Properties - Add read-only
is_userandis_organizationproperties and field descriptions. The convenience properties are not included in JSON output.
Changed¶
Models - Authentication¶
- DTO and UUID Field Names - Rename
OwnertoOwnerDTOwithout a compatibility alias, rename itsuuidfield toowner_uuid, and renameAuthenticatedUserDTO.user_idtouser_uuid. Update imports, constructor arguments, attribute access, and serialized payload consumers accordingly. - UserInfo Subject Alias - Expose the string subject as
KeycloakUserInfoDTO.user_uuidin Python while retainingsubfor OIDC input and serialized UserInfo claims. Token and actor claim field names remain unchanged. - Enriched Owner Serialization - Owner JSON includes
owner_uuid,type,user, andorganization; the unmatched claim field isnull. 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.