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 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
name: keycloak-realm-settings-8 name: keycloak-realm-settings-9
namespace: sso namespace: sso
spec: spec:
backoffLimit: 0 backoffLimit: 0
@ -147,25 +147,17 @@ spec:
for ex in executions: for ex in executions:
if ex.get("providerId") != "identity-provider-redirector": if ex.get("providerId") != "identity-provider-redirector":
continue continue
ex_id = ex.get("id") if ex.get("requirement") == "DISABLED":
if not ex_id:
continue continue
status, ex_rep = http_json( ex["requirement"] = "DISABLED"
"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"
status, _ = http_json( status, _ = http_json(
"PUT", "PUT",
f"{base_url}/admin/realms/{realm}/authentication/executions/{ex_id}", f"{base_url}/admin/realms/{realm}/authentication/flows/browser/executions",
access_token, access_token,
ex_rep, ex,
) )
if status not in (200, 204): 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 PY