From 89c56631c8e87810d0d8b9f3a640e64d9066db62 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:43:29 +0100 Subject: [PATCH] [PR #7789/08ece2e0 backport][stable-8] Allow custom providerId in keycloak_user_federation (#7804) Allow custom providerId in keycloak_user_federation (#7789) * Update keycloak_user_federation.py * stub out changelog * update PR reference * remove 'choices' from documentation * Apply suggestions from code review Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein (cherry picked from commit 08ece2e0fabdcc698e003bcb480b1f0f17360f53) Co-authored-by: Clif Reeder --- ...789-keycloak-user-federation-custom-provider-type.yml | 2 ++ plugins/modules/keycloak_user_federation.py | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/7789-keycloak-user-federation-custom-provider-type.yml diff --git a/changelogs/fragments/7789-keycloak-user-federation-custom-provider-type.yml b/changelogs/fragments/7789-keycloak-user-federation-custom-provider-type.yml new file mode 100644 index 0000000000..dd20a4ea18 --- /dev/null +++ b/changelogs/fragments/7789-keycloak-user-federation-custom-provider-type.yml @@ -0,0 +1,2 @@ +minor_changes: + - keycloak_user_federation - allow custom user storage providers to be set through ``provider_id`` (https://github.com/ansible-collections/community.general/pull/7789). diff --git a/plugins/modules/keycloak_user_federation.py b/plugins/modules/keycloak_user_federation.py index 8c50cb7f3e..fee0d1265c 100644 --- a/plugins/modules/keycloak_user_federation.py +++ b/plugins/modules/keycloak_user_federation.py @@ -64,14 +64,11 @@ options: provider_id: description: - - Provider for this user federation. + - Provider for this user federation. Built-in providers are V(ldap), V(kerberos), and V(sssd). + Custom user storage providers can also be used. aliases: - providerId type: str - choices: - - ldap - - kerberos - - sssd provider_type: description: @@ -805,7 +802,7 @@ def main(): realm=dict(type='str', default='master'), id=dict(type='str'), name=dict(type='str'), - provider_id=dict(type='str', aliases=['providerId'], choices=['ldap', 'kerberos', 'sssd']), + provider_id=dict(type='str', aliases=['providerId']), provider_type=dict(type='str', aliases=['providerType'], default='org.keycloak.storage.UserStorageProvider'), parent_id=dict(type='str', aliases=['parentId']), mappers=dict(type='list', elements='dict', options=mapper_spec),