+257
−0
Loading
Two FMs as separate uvicorn processes, each with its own database, plus the real Keycloak. FM-A bootstraps with FM_BOOTSTRAP_FEDERATION=true, fetches a client-credentials token as originating-op-1 and calls FM-B's POST /partner over HTTP. FM-B validates the JWT against Keycloak's JWKS, matches azp to its partner row and mints a context id. Asserts both databases hold the same federationContextId and that FM-B's health endpoint answers AVAILABLE with a real token; a token from the wrong client cannot read the context. Separate processes because get_settings() is an lru_cache singleton, so two apps cannot hold different config in one process. Requires FM_ALLOW_INSECURE_PARTNER_ENDPOINTS since the local stack has no TLS. Requires the compose stack (Keycloak + Postgres) running.