Expose provider-neutral identity reconciliation
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
tegwick 2026-07-29 23:41:47 +02:00
parent de2c02dc6d
commit a336f594e7
4 changed files with 189 additions and 18 deletions

View file

@ -66,6 +66,15 @@ class ProvisioningResult:
password_setup_url: str | None = None
@dataclass(frozen=True)
class IdentityDriftResult:
provider: str
external_subject: str
status: str
drift: tuple[str, ...] = ()
changed: tuple[str, ...] = ()
class IdentityProvisioningPort(Protocol):
"""Lifecycle seam owned by NetKingdom adapters, not the user domain."""
@ -87,6 +96,24 @@ class IdentityProvisioningPort(Protocol):
) -> ProvisioningResult:
"""Remove or tombstone an identity according to provider policy."""
def drift(
self,
request: ProvisioningRequest,
*,
external_subject: str,
desired_status: str = "active",
) -> IdentityDriftResult:
"""Inspect provider state without changing it or exposing credentials."""
def reconcile(
self,
request: ProvisioningRequest,
*,
external_subject: str,
desired_status: str = "active",
) -> IdentityDriftResult:
"""Converge managed provider state toward the requested lifecycle."""
class UserEngineStore(Protocol):
"""Durable persistence boundary for user-engine service behavior.