keycloak: fix token exchange permission patching
This commit is contained in:
parent
1f2bddc7fe
commit
cb37756f5f
@ -2,7 +2,7 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: keycloak-portal-e2e-token-exchange-permissions-2
|
||||
name: keycloak-portal-e2e-token-exchange-permissions-3
|
||||
namespace: sso
|
||||
spec:
|
||||
backoffLimit: 6
|
||||
@ -228,7 +228,7 @@ spec:
|
||||
policies_list.append(entry)
|
||||
perm["policies"] = policies_list
|
||||
st, body = http_json("PUT", url_used, token, perm)
|
||||
if st in (200, 204):
|
||||
if st in (200, 201, 204):
|
||||
return
|
||||
|
||||
# Retry once with the other identifier form.
|
||||
@ -236,7 +236,7 @@ spec:
|
||||
if alt_entry not in policies_list:
|
||||
perm["policies"] = [p for p in policies_list if p != entry] + [alt_entry]
|
||||
st2, body2 = http_json("PUT", url_used, token, perm)
|
||||
if st2 in (200, 204):
|
||||
if st2 in (200, 201, 204):
|
||||
return
|
||||
raise SystemExit(f"Failed updating permission {permission_id} (status={st2}) resp={body2}")
|
||||
raise SystemExit(f"Failed updating permission {permission_id} (status={st}) resp={body}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user