From 30c65cd84c847563394c8e5220b4cd9113d8af57 Mon Sep 17 00:00:00 2001 From: Alex Lubbock Date: Mon, 28 Mar 2022 20:28:03 +0100 Subject: [PATCH] keycloak_client: add default_client_scopes and optional_client_scopes (#4385) * keycloak_client: add default_client_scopes and optional_client_scopes * Changelog fragment for #4385 * Update changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml Co-authored-by: Felix Fontein * Update plugins/modules/identity/keycloak/keycloak_client.py Co-authored-by: Felix Fontein * Update plugins/modules/identity/keycloak/keycloak_client.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- ...eycloak-client-default-optional-scopes.yml | 4 ++++ .../identity/keycloak/keycloak_client.py | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml diff --git a/changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml b/changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml new file mode 100644 index 0000000000..7255dd6343 --- /dev/null +++ b/changelogs/fragments/4385-keycloak-client-default-optional-scopes.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - keycloak_client - add ``default_client_scopes`` and ``optional_client_scopes`` parameters. + (https://github.com/ansible-collections/community.general/pull/4385). diff --git a/plugins/modules/identity/keycloak/keycloak_client.py b/plugins/modules/identity/keycloak/keycloak_client.py index 82cdab8b6c..2069ec7061 100644 --- a/plugins/modules/identity/keycloak/keycloak_client.py +++ b/plugins/modules/identity/keycloak/keycloak_client.py @@ -326,6 +326,24 @@ options: - authenticationFlowBindingOverrides version_added: 3.4.0 + default_client_scopes: + description: + - List of default client scopes. + aliases: + - defaultClientScopes + type: list + elements: str + version_added: 4.7.0 + + optional_client_scopes: + description: + - List of optional client scopes. + aliases: + - optionalClientScopes + type: list + elements: str + version_added: 4.7.0 + protocol_mappers: description: - a list of dicts defining protocol mappers for this client. @@ -789,6 +807,8 @@ def main(): authentication_flow_binding_overrides=dict(type='dict', aliases=['authenticationFlowBindingOverrides']), protocol_mappers=dict(type='list', elements='dict', options=protmapper_spec, aliases=['protocolMappers']), authorization_settings=dict(type='dict', aliases=['authorizationSettings']), + default_client_scopes=dict(type='list', elements='str', aliases=['defaultClientScopes']), + optional_client_scopes=dict(type='list', elements='str', aliases=['optionalClientScopes']), ) argument_spec.update(meta_args)