keycloak_user_federation: get the before mappers from `before_comp` to fix `UnboundLocalError` (#8831)
* fix: get the before mappers from `before_comp`
* add changelog fragment
* Adjust changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2ae41fa83f)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
use dict comprehension in plugins, part 3 (#8833)
* use dict comprehension in plugins, part 3
* add changelog frag
(cherry picked from commit 26df6c7657)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
keycloak_user_federation: sort desired and after mappers by name (#8761)
* sort desired mappers by name
* sort mappers fetched after update by name
* only sort mapper list if there are desired mappers specified
* add fallback `''` in case `name` is not a key or `None` when sorting mappers
* add changelog fragment
(cherry picked from commit 982b8d89b7)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
use dict comprehension in plugins, part 2 (#8822)
* use dict comprehension in plugins
* add changelog frag
(cherry picked from commit 7e978c77b4)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
keycloak_user_federation: add module arg to make mapper removal optout (#8764)
* add module arg to make mapper removal optout
* change parameter name to snake case: remove_unspecified_mappers
* add period to parameter description
Co-authored-by: Felix Fontein <felix@fontein.de>
* use dict indexing to get parameter instead of `.get()`
* add changelog fragment
* Update changelogs/fragments/8764-keycloak_user_federation-make-mapper-removal-optout.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* add `version_added` to argument description
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/keycloak_user_federation.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 7dc4429c9c)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
keycloak_user_federation: fix key error when removing mappers in update (#8762)
* remove new mappers without an id from list comprehension
* add changelog fragment
* Update changelogs/fragments/8762-keycloac_user_federation-fix-key-error-when-updating.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b79ac4f0ac)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
keycloak_user_federation: add mapper removal (#8695)
* add unwanted mapper removal
* check for mapper updates in already fetched data to remove unnecessary API calls
* added mock answers and updated request count to match the added delete and fetch after_comp calls
* fix sanity issues
* add changelog fragment
* removed automatic field numbering from format
* replace filter expression with list comprehension
Co-authored-by: Felix Fontein <felix@fontein.de>
* add module name, link to issue and link to PR to changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
* Use list comprehension.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2942eda8e0)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
* feat(modules/keycloak_user_federation): mapper ...
... provider type should have a default value
* add changelog fragment
---------
Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
* fix(modules/keycloak_user_federation): fixes ...
... user federation creation failing when also updating/changing default
mappers at the same time
* add changelog fragment for pr
Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
* fix(modules/keycloak_user_federation): fixes ...
... federation read call not finding already existing federations
properly because of bad parametrisation
* fix(modules/keycloak_user_federation): added ...
... new integration test for module idempotency bugfix
* added changelog fragment for pr
Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>