-
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
bugfix(keycloak): fix parameters for realm key creation #8823
bugfix(keycloak): fix parameters for realm key creation #8823
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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! I've added some first comments.
@@ -371,7 +371,7 @@ def main(): | |||
parent_id = module.params.get('parent_id') | |||
|
|||
# Get a list of all Keycloak components that are of keyprovider type. | |||
realm_keys = kc.get_components(urlencode(dict(type=provider_type, parent=parent_id)), parent_id) | |||
realm_keys = kc.get_components(urlencode(dict(type=provider_type)), parent_id) |
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.
Hmm, I wonder whether this is something that changed over time, and thus is still needed for older Keycloak versions.
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.
a) looking at the oldest available docs (keycloak 21.0), this has always been optional
b) it is filtered to this realm scope anyways since .get_components requests from GET /{realm}/components
Co-authored-by: Felix Fontein <[email protected]>
If nobody objects I'll merge this on this weekend for 9.4.0. |
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8839 🤖 @patchback |
* bugfix(keycloak): fix parameters for realm key creation * supply changelog fragment * fix formatting * fix formatting * Update changelogs/fragments/8823-keycloak-realm-key.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ea389e7)
@fivetide thanks for your contribution! |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8840 🤖 @patchback |
* bugfix(keycloak): fix parameters for realm key creation * supply changelog fragment * fix formatting * fix formatting * Update changelogs/fragments/8823-keycloak-realm-key.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ea389e7)
…rs for realm key creation (#8840) bugfix(keycloak): fix parameters for realm key creation (#8823) * bugfix(keycloak): fix parameters for realm key creation * supply changelog fragment * fix formatting * fix formatting * Update changelogs/fragments/8823-keycloak-realm-key.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ea389e7) Co-authored-by: Björn Bösel <[email protected]>
…rs for realm key creation (#8839) bugfix(keycloak): fix parameters for realm key creation (#8823) * bugfix(keycloak): fix parameters for realm key creation * supply changelog fragment * fix formatting * fix formatting * Update changelogs/fragments/8823-keycloak-realm-key.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit ea389e7) Co-authored-by: Björn Bösel <[email protected]>
…ections#8823) * bugfix(keycloak): fix parameters for realm key creation * supply changelog fragment * fix formatting * fix formatting * Update changelogs/fragments/8823-keycloak-realm-key.yml Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
This fixes #7850. Realm key creation on keycloak side needs the parent_id to be either the ID of the realm or to be omitted. The modules mixed up the realm name - as used in the url - with the id, leading to invalid created entities. In addition the get_components request for getting the current state filtered with the same invalid value.
ISSUE TYPE
COMPONENT NAME
community.general.keycloak_realm_key