ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
827 stars 1.52k forks source link

Allow Keycloak_* modules to use grant_type=client_credentials #7469

Open logabot opened 1 year ago

logabot commented 1 year ago

Summary

Some of keycloak modules( example keycloak_realm.py ) don't allow to use grant_type = client_credentials. In argument I can't define auth_client_secret without auth_username and auth_password. https://github.com/ansible-collections/community.general/blob/6d0bcec1cb579ce7244b3042177d44ca1abd9573/plugins/modules/keycloak_realm.py#L692-L697

In module_utils grant_type is hardcoded. https://github.com/ansible-collections/community.general/blob/6d0bcec1cb579ce7244b3042177d44ca1abd9573/plugins/module_utils/identity/keycloak/keycloak.py#L164-L180

You can allow to define custom grant_type or one of.

Issue Type

Feature Idea

Component Name

keycloak_realm

Additional Information

- name: Create keycloak realm
  community.general.keycloak_realm:
    auth_keycloak_url: "{{ keycloak_url }}"
    auth_client_id: "{{ auth_client_id }}"
    auth_realm: "{{ auth_realm }}"
    auth_client_secret: "{{ auth_client_secret }}"
    realm: "{{ realm_name }}"
    state: present
    auth_username: omit
    auth_password: omit
.....

Code of Conduct

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 year ago

cc @eikef @kris2kris @mattock @ndclt click here for bot help

ansibullbot commented 3 months ago

cc @thomasbach-dev click here for bot help