Test a Federation Configuration End-to-End
Resolves the candidate federation configuration against a synthetic user AND dispatches a one-shot smoke probe (the caller-supplied test_script, e.g. “SELECT 1”) to the agent identified in the request body. Persisted state is never read or written: the entire candidate connection + federation pair lives in the body. Returns the resolved principal, the env-var keys that were injected (values are never returned), and the agent-side stdout/stderr of the probe. Success requires both phases to succeed.
Body
The request body resource
Config is the candidate federation configuration to test. Required. Carries the plaintext admin_credentials_json the resolver will use to authenticate; the value never reaches persistence on this endpoint.
Connection is the candidate connection the probe runs against. Required. The endpoint does NOT look up a persisted connection by name/id — the caller supplies the agent, command, script and envs directly so a wizard draft can be exercised before persistence.
UserEmail is the synthetic user to resolve. Required.
"alice@example.com"
UserID is the synthetic user ID. Optional; defaults to a deterministic UUID derived from UserEmail.
"00000000-0000-0000-0000-000000000001"
Response
OK
AdminPrincipal is the impersonator identity (e.g. admin SA email).
"hoop-admin@proj.iam.gserviceaccount.com"
EnvVarKeys lists the env vars the resolver injected into the probe. Values are never returned.
[
"HOOP_GCP_ACCESS_TOKEN",
"HOOP_GCP_TOKEN_EXPIRES_AT"
]Error is the human-readable failure reason when Success=false. Populated for federation-resolve failures; probe-side failures are reported via ProbeStatus + ProbeOutput.
"failed minting access token: permission denied"
ProbeOutput is the agent's merged stdout+stderr from the smoke probe. Empty when ProbeStatus="skipped".
"+---+\n| f0_ |\n+---+\n| 1 |\n+---+"
ProbeStatus reports the agent-side outcome. "success" when exit code was 0; "failed" otherwise; "skipped" when federation resolve failed and the probe was not dispatched.
success, failed, skipped "success"
ResolvedPrincipal is the principal the resolver impersonated.
"alice@example.com"
Success is true only when federation resolved AND the agent probe returned exit code 0.
true
SupersededEnvVars lists the candidate connection's static env var names that the provider's output supersedes and that were therefore stripped from the probe (and would be stripped from a real session). Lets the admin UI show "these legacy credentials were ignored" so the operator can confidently remove them from the persisted connection. Example: gcp_iam supersedes GOOGLE_APPLICATION_CREDENTIALS.
["GOOGLE_APPLICATION_CREDENTIALS"]TokenExpiresAt is the would-be credential expiry.
"2025-05-25T18:00:00Z"