[PR #9987/a8b97732 backport][stable-10] Fix Keycloak authentication flow configuration issues (#10018)

Fix Keycloak authentication flow configuration issues (#9987)

* Add delete_authentication_config method and integrate it into create_or_update_executions

* typo

* Sanity

* Add integration tests for keycloak_authentication module with README, tasks, and variables

* Add copyright and license information to access_token.yml

* Sanity

* Refactor Keycloak integration tests: streamline README, update access token task, and enhance variable management

* Maj changelogs fragments

---------

Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
(cherry picked from commit a8b977320c)

Co-authored-by: desand01 <desrosiers.a@hotmail.com>
This commit is contained in:
patchback[bot] 2025-04-19 09:33:56 +02:00 committed by GitHub
parent 138740127a
commit 1c1d58482c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 262 additions and 0 deletions

View file

@ -308,6 +308,8 @@ def create_or_update_executions(kc, config, realm='master'):
}
# add the execution configuration
if new_exec["authenticationConfig"] is not None:
if "authenticationConfig" in execution and "id" in execution["authenticationConfig"]:
kc.delete_authentication_config(execution["authenticationConfig"]["id"], realm=realm)
kc.add_authenticationConfig_to_execution(updated_exec["id"], new_exec["authenticationConfig"], realm=realm)
for key in new_exec:
# remove unwanted key for the next API call