-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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_userprofile: fix empty response by removing parent
filter when fetching userprofile component
#8923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml
Outdated
Show resolved
Hide resolved
…nse-when-fetching-userprofile.yml Co-authored-by: Felix Fontein <felix@fontein.de>
If nobody objects I'll merge this in a week. |
Backport to stable-8: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 83080cc on top of patchback/backports/stable-8/83080cc0054b62c0c4624e66ce4501cf14fc0b21/pr-8923 Backporting merged PR #8923 into main
🤖 @patchback |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8960 🤖 @patchback |
@fgruenbauer thanks for your contribution! |
…when fetching userprofile component (#8923) * remove parent filter when fetching userprofile component * add changelog fragment * Update changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 83080cc)
…y response by removing `parent` filter when fetching userprofile component (#8960) keycloak_userprofile: fix empty response by removing `parent` filter when fetching userprofile component (#8923) * remove parent filter when fetching userprofile component * add changelog fragment * Update changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 83080cc) Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
…when fetching userprofile component (ansible-collections#8923) * remove parent filter when fetching userprofile component * add changelog fragment * Update changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
SUMMARY
The module filters the components by
parent=parent_id
(andtype
). The same variableparent_id
is also used as therealm
argument for theget_components
call.community.general/plugins/modules/keycloak_userprofile.py
Line 644 in 89ad40d
community.general/plugins/module_utils/identity/keycloak/keycloak.py
Line 2612 in 89ad40d
The
parent
filter expects the ID of the parent realm (usually a uuid) whereas therealm
argument requires the name of a realm ('master' for example). So unless the ID and the name of realm are identical the returned list is empty.Since the components are already filtered by realm with
realm=parent_id
, i think the filterparent=parent_id
can be removed.ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION