Skip to content

Commit

Permalink
keycloak_user_federation: fix diff of empty krbPrincipalAttribute (a…
Browse files Browse the repository at this point in the history
…nsible-collections#8320)

keycloak_user_federation: fix diff of empty `krbPrincipalAttribute` (ansible-collections#8320)
  • Loading branch information
yeoldegrove authored and Massl123 committed Feb 7, 2025
1 parent 17ccda2 commit 8c090f9
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 @@ -719,6 +719,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 8c090f9

Please sign in to comment.