1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/module_utils
patchback[bot] 2322937a4a
Keycloak: add authentication management (#2456) (#2864)
* Allow keycloak_group.py to take token as parameter for the authentification

Refactor get_token to pass module.params + Documentation

Fix unit test and add new one for token as param

Fix identation

Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Allow keycloak_group.py to take token as parameter for the authentification

Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Check if base_url is None before to check format

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Switch to modern syntax for the documentation (e.g. community.general.keycloak_client)

Update keycloak_client.py

Update keycloak_clienttemplate.py

Add keycloak_authentication module to manage authentication

Minor fixex

Fix indent

* Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Removing variable ANSIBLE_METADATA from beginning of file

Minor fix

Refactoring create_or_update_executions :add change_execution_priority function

Refactoring create_or_update_executions :add create_execution function

Refactoring create_or_update_executions: add create_subflow

Refactoring create_or_update_executions: add update_authentication_executions function

Minor fix

* Using FQCN for the examples

Minor fix

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/identity/keycloak/keycloak_authentication.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Refactoring: rename isDictEquals into is_dict_equals

Refactoring: rename variable as authentication_flow

Refactoring: rename variable as new_name

Refactoring: rename variable as flow_list

Refactoring: rename variable as new_flow

Refactoring: changing construction of dict newAuthenticationRepresentation and renaming as new_auth_repr

Minor fix

* Refactoring: rename variables with correct Python syntax (auth_repr, exec_repr)

Move create_or_update_executions function from keycloak.py to keycloak_authentication.py

Minor fix

Remove mock_create_or_update_executions not needed anymore

Fix unit test

Update plugins/module_utils/identity/keycloak/keycloak.py

is_dict_equals function return True if value1 empty

Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

Rename is_dict_equal as is_struct_included and rename params as struct1 and struct2

Rename variables according to Python naming conventions

Refactoring: add find_exec_in_executions function in keycloak_authentication to remove code duplication

typo

Add blank line

Add required parameter, either creds or token

Typo

try/except only surround for loop containing struct2[key]

Add sub-options to meta_args

assigment of result['changed'] after if-elif-else block

Fix CI error: parameter-type-not-in-doc

Fix unit test: none value excluded from comparison

Minor fix

Simplify is_struct_included function

Replace 'type(..) is' by isinstance(..)

Remove redundant required=True and redundant parenthesis

Add check_mode, check if value is None (None value added by argument spec checker)

Apply suggestions from code review

Update plugins/modules/identity/keycloak/keycloak_authentication.py

* Update plugins/modules/identity/keycloak/keycloak_authentication.py

* Add index paramter to configure the priority order of the execution

* Minor fix: authenticationConfig dict instead of str

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 24c5d4320f)

Co-authored-by: Gaetan2907 <48204380+Gaetan2907@users.noreply.github.com>
2021-06-24 19:14:46 +02:00
..
compat sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
identity/keycloak Keycloak: add authentication management (#2456) (#2864) 2021-06-24 19:14:46 +02:00
mh [PR #2731/6a41fba2 backport][stable-3] ModuleHelper - also uses LC_ALL to force language (#2736) 2021-06-07 13:27:30 +02:00
net_tools meta/runtime.yml and __init__.py cleanup (#2632) (#2653) 2021-05-27 20:15:22 +02:00
oracle meta/runtime.yml and __init__.py cleanup (#2632) (#2653) 2021-05-27 20:15:22 +02:00
remote_management/lxca meta/runtime.yml and __init__.py cleanup (#2632) (#2653) 2021-05-27 20:15:22 +02:00
source_control meta/runtime.yml and __init__.py cleanup (#2632) (#2653) 2021-05-27 20:15:22 +02:00
storage meta/runtime.yml and __init__.py cleanup (#2632) (#2653) 2021-05-27 20:15:22 +02:00
_mount.py Remove ansible.posix dependency (#1157) 2020-10-28 12:57:00 +01:00
_netapp.py Add no_log to some module arguments (#1725) 2021-02-04 21:02:21 +01:00
alicloud_ecs.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
cloud.py Update CI (#1782) 2021-02-11 10:24:58 +01:00
csv.py New Filter plugin from_csv (#2037) 2021-03-21 13:21:54 +01:00
database.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
dimensiondata.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
gandi_livedns_api.py Add gandi_livedns module (#328) 2021-03-21 11:25:24 +01:00
gitlab.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
heroku.py Initial commit 2020-03-09 09:11:07 +00:00
hwc_utils.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
ibm_sa_utils.py Initial commit 2020-03-09 09:11:07 +00:00
influxdb.py InfluxDB_database: Make the path argument conditional on the InfluxDB version (#1126) 2020-11-06 09:12:00 +01:00
ipa.py Added modules ipa_otpconfig and ipa_otptoken (#2122) 2021-04-11 15:25:03 +02:00
known_hosts.py rewritten as list literals (#2160) 2021-04-05 09:22:06 +02:00
ldap.py Feature/ldap gssapi sasl authentication (#1595) 2021-01-27 08:15:38 +01:00
linode.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
lxd.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
manageiq.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
memset.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
module_helper.py module_helper.py Breakdown (#2393) (#2492) 2021-05-11 20:05:42 +02:00
oneandone.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
oneview.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
online.py Initial commit 2020-03-09 09:11:07 +00:00
opennebula.py opennebula: add one_template module (#2046) 2021-03-26 07:24:24 +01:00
proxmox.py proxmox: create a common base (#1331) 2020-11-24 17:30:39 +01:00
pure.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
rax.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
redfish_utils.py modified redfish_config and idrac_redfish_config to skip incorrect attributes (#2334) (#2491) 2021-05-11 20:05:24 +02:00
redhat.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
saslprep.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
scaleway.py fix: scaleway inventory pagination (#2036) 2021-03-18 23:06:56 +01:00
univention_umc.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
utm_utils.py fixed Python 3 keys() usage (#1861) 2021-02-23 23:19:27 +01:00
vexata.py sanity: Add future boilerplate (#573) 2020-06-24 21:50:36 +02:00
xenserver.py xenserver_guest - fixed validations (#2243) 2021-04-17 09:32:13 +02:00