keycloak(atlas): disable browser IdP redirector

This commit is contained in:
Brad Stein 2026-01-02 20:09:05 -03:00
parent 21d8fc3788
commit 0f26bd508e

View File

@ -2,7 +2,7 @@
apiVersion: batch/v1
kind: Job
metadata:
name: keycloak-realm-settings-8
name: keycloak-realm-settings-9
namespace: sso
spec:
backoffLimit: 0
@ -147,25 +147,17 @@ spec:
for ex in executions:
if ex.get("providerId") != "identity-provider-redirector":
continue
ex_id = ex.get("id")
if not ex_id:
if ex.get("requirement") == "DISABLED":
continue
status, ex_rep = http_json(
"GET",
f"{base_url}/admin/realms/{realm}/authentication/executions/{ex_id}",
access_token,
)
if status != 200 or not ex_rep:
raise SystemExit(f"Unable to fetch browser execution {ex_id} (status={status})")
if ex_rep.get("requirement") == "DISABLED":
continue
ex_rep["requirement"] = "DISABLED"
ex["requirement"] = "DISABLED"
status, _ = http_json(
"PUT",
f"{base_url}/admin/realms/{realm}/authentication/executions/{ex_id}",
f"{base_url}/admin/realms/{realm}/authentication/flows/browser/executions",
access_token,
ex_rep,
ex,
)
if status not in (200, 204):
raise SystemExit(f"Unexpected execution update response for {ex_id}: {status}")
raise SystemExit(
f"Unexpected execution update response for identity-provider-redirector: {status}"
)
PY