5.30.0 — 2026-11-16¶
← 5.31.0 | 5.29.1 → | ↑ 5.x series
Added¶
Adapters - Keycloak¶
- Authenticated Resource Ownership - Add
resolve_owner(context)andget_authenticated_owner()with an immutable PydanticOwnerandOwnerType.USER/OwnerType.ORGANIZATION. Reject wildcard, unselected, and inconsistent organization contexts without falling back to personal ownership. Ownership identifies resource scope; services still authorize operations. PR #585, issue #584.
Changed¶
Models - Authentication¶
- UUID User Identifiers -
AuthenticatedUserDTO.user_idis now aUUID. JSON serialization remains a string. Invalid UserInfo subject UUIDs raiseUnauthenticatedError; direct DTO construction rejects invalid UUIDs through Pydantic validation.- Replace
UUID(context.user_id)withcontext.user_id, or useUUID(str(context.user_id))when supporting both older and newer versions. - Convert explicitly with
str(context.user_id)at string API boundaries and when comparing against string identifiers. - Update affected account-service and advertiser-service consumers before upgrading. Preserve both owner UUID and owner type in resource queries.
- Replace
Fixed¶
Tests - Envoy¶
- Proxy Startup - Use IPv4-only DNS for Docker's IPv4 host gateway, avoiding the IPv6 lookup delay that caused startup timeouts. Measured proxy readiness improved from approximately 59 seconds to 1.34 seconds.
Tests¶
Tests - Keycloak¶
- Ownership and Authentication Coverage - Add resolver and real-Keycloak integration scenarios in the existing feature files for FastAPI and synchronous/asynchronous gRPC. Cover personal and selected-organization ownership, wildcard and alias-only rejection, malformed subject errors, and impersonation behavior. Update legacy impersonation fixtures to use UUID subjects.
- Validation - All 262 auth and authentication/mappers scenarios passed locally with real Keycloak and Envoy, without exclusions. Formatting, lint, typing, import contracts, security scans, and pre-commit hooks passed.