-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keycloak_user_federation: set krbPrincipalAttribute
to ''
if unset in kc responses
#8785
Conversation
@fgruenbauer this PR contains the following merge commits: Please rebase your branch to remove these commits. |
5964005
to
5ea8a2d
Compare
Please remember to add a changelog fragment. Thanks! |
Sry - Done. |
...ents/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml
Outdated
Show resolved
Hide resolved
…cipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]>
If nobody objects I'll merge this by the end of the week. |
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8891 🤖 @patchback |
…t in kc responses (#8785) * set `krbPrincipalAttribute` to `''` if unset in kc before and after responses * add changelog fragment * Update changelogs/fragments/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ac302eb)
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8892 🤖 @patchback |
@fgruenbauer thanks for fixing this! |
…t in kc responses (#8785) * set `krbPrincipalAttribute` to `''` if unset in kc before and after responses * add changelog fragment * Update changelogs/fragments/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ac302eb)
…`krbPrincipalAttribute` to `''` if unset in kc responses (#8891) keycloak_user_federation: set `krbPrincipalAttribute` to `''` if unset in kc responses (#8785) * set `krbPrincipalAttribute` to `''` if unset in kc before and after responses * add changelog fragment * Update changelogs/fragments/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ac302eb) Co-authored-by: fgruenbauer <[email protected]>
…`krbPrincipalAttribute` to `''` if unset in kc responses (#8892) keycloak_user_federation: set `krbPrincipalAttribute` to `''` if unset in kc responses (#8785) * set `krbPrincipalAttribute` to `''` if unset in kc before and after responses * add changelog fragment * Update changelogs/fragments/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ac302eb) Co-authored-by: fgruenbauer <[email protected]>
…t in kc responses (ansible-collections#8785) * set `krbPrincipalAttribute` to `''` if unset in kc before and after responses * add changelog fragment * Update changelogs/fragments/8785-keycloak_user_federation-set-krbPrincipalAttribute-to-empty-string-if-missing.yaml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
Issue:
The
keycloak_user_federation
module always detects a change in check mode if the parameterkrbPrincipalAttribute
is set to''
. The empty string is a valid value:community.general/plugins/modules/keycloak_user_federation.py
Line 354 in 96d5e6e
Keycloak completely removes the parameter
krbPrincipalAttribute
if it is set to''
. So subsequent check runs always detect a change. In a normal run the module would always make an update (its the same change check), but compare the before and after responses afterwards, in both of which the parameter is not present. In the check diff this is already fixed by setting''
in the sanitize function if the parameter is not present (see 8320).Proposed solution:
Normalize the keycloak responses (before and after) by setting
krbPrincipalAttribute = ''
if the parameter is not present in the response.ISSUE TYPE
COMPONENT NAME
keycloak_user_federation
ADDITIONAL INFORMATION
krbPrincipalAttribute = ''
for the module