Skip to content

Commit

Permalink
[PR #8320/a71e1913 backport][stable-7] keycloak_user_federation: fix …
Browse files Browse the repository at this point in the history
…diff of empty `krbPrincipalAttribute` (#8339)

keycloak_user_federation: fix diff of empty `krbPrincipalAttribute` (#8320)

keycloak_user_federation: fix diff of empty `krbPrincipalAttribute` (#8320)

(cherry picked from commit a71e191)

Co-authored-by: Eike Waldt <[email protected]>
  • Loading branch information
patchback[bot] and yeoldegrove authored May 11, 2024
1 parent ba9f295 commit be4e7fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- keycloak_user_federation - fix diff of empty ``krbPrincipalAttribute`` (https://github.com/ansible-collections/community.general/pull/8320).
3 changes: 3 additions & 0 deletions plugins/modules/keycloak_user_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,9 @@ def sanitize(comp):
compcopy['config'] = dict((k, v[0]) for k, v in compcopy['config'].items())
if 'bindCredential' in compcopy['config']:
compcopy['config']['bindCredential'] = '**********'
# an empty string is valid for krbPrincipalAttribute but is filtered out in diff
if 'krbPrincipalAttribute' not in compcopy['config']:
compcopy['config']['krbPrincipalAttribute'] = ''
if 'mappers' in compcopy:
for mapper in compcopy['mappers']:
if 'config' in mapper:
Expand Down

0 comments on commit be4e7fc

Please sign in to comment.