community.general/changelogs/fragments
patchback[bot] da040cb412
[PR #9494/af011827 backport][stable-10] Keycloak modules retry request on authentication error, support refresh token parameter (#9631)
Keycloak modules retry request on authentication error, support refresh token parameter (#9494)

* feat: begin refactor to support refresh token in keycloak modules

* chore: add start of tests for shared token usage

* feat: progress towards supporting refresh token; token introspection not yet working [8857]

* chore: reset to main branch previous state; a different approach is needed [8857]

* feat: add request methods to keycloak class, which will be expanded with retry logic [8857]

* feat: all requests to keycloak use request methods instead of open_url [8857]

* fix: data argument is optional in keycloak request methods [8857]

* feat: add integration test for keycloak module authentication methods [8857]

* chore: refactor get token logic to separate logic using username/pass credentials [8857]

* chore: refactor token request logic further to isolate request logic [8857]

* chore: fix minor lint issues [8857]

* test: add (currently failing) test for request with invalid auth token, valid refresh token [8857]

* chore: allow realm to be provided to role module with refresh_token, without username/pass [8857]

* feat: add retry logic to requests in keycloak module utils [8857]

* chore: rename keycloak module fail_open_url method to fail_request [8857]

* chore: update all keycloak modules to support refresh token param [8857]

* chore: add refresh_token param to keycloak doc_fragments [8857]

* chore: restore dependency between auth_realm and auth_username,auth_password params [8857]

* chore: rearrange module param checks to reduce future pr size [8857]

* chore: remove extra comma [8857]

* chore: update version added for refresh token param [8857]

* chore: add changelog fragment [8857]

* chore: re-add fail_open_url to keycloak module utils for backward compatability [8857]

* fix: do not make a new request to keycloak without reauth when refresh token not provided (#8857)

* fix: only make final auth attempt if username/pass provided, and return exception on failure (#8857)

* fix: make re-auth and retry code more consistent, ensure final exceptions are thrown (#8857)

* test: fix arguments for invalid token, valid refresh token test (#8857)

* feat: catch invalid refresh token errors during re-auth attempt (#8857)

Add test to verify this behaviour works.

* test: improve test coverage, including some unhappy path tests for authentication failures (#8857)

* chore: store auth errors from token request in backwards compatible way (#8857)

* fix: ensure method is still specified for all requests (#8857)

* chore: simplify token request logic (#8857)

* chore: rename functions to request tokens using refresh token or username/password (#8857)

To emphasize their difference from the `get_token` function,
which either gets the token from the module params
*or* makes a request for it.

* doc: add docstrings for new or significantly modified functions (#8857)

* test: repair unit test following change to exception message upon key error during auth request (#8857)

(cherry picked from commit af0118278b)

Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
2025-01-26 15:43:41 +01:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
10.3.0.yml Prepare 10.3.0. 2025-01-18 17:15:19 +01:00
9403-redfish-add-get-accountservice.yml [PR #9403/e853bdf6 backport][stable-10] Redfish: implement obtaining AccountService config (#9511) 2025-01-02 16:37:15 +01:00
9494-keycloak-modules-retry-request-on-authentication-error.yaml [PR #9494/af011827 backport][stable-10] Keycloak modules retry request on authentication error, support refresh token parameter (#9631) 2025-01-26 15:43:41 +01:00
9539-iocage-inventory-dhcp.yml [PR #9539/94d5256a backport][stable-10] Fix #9538 Inventory iocage fails when DHCP is enabled (#9568) 2025-01-13 18:28:24 +01:00
9546-fix-handling-of-tap-homebrew-packages.yml [PR #9546/114deae3 backport][stable-10] Fix homebrew tap name handling (#9569) 2025-01-13 18:28:13 +01:00
9547-one_template-filter.yml [PR #9547/c823e37d backport][stable-10] add filter support for one_template module (#9575) 2025-01-15 20:56:55 +01:00
9554-add-cpanm-option_with-recommends-and-suggests.yml [PR #9555/e2d19a96 backport][stable-10] Add cpanm option --with-recommends (#9574) 2025-01-15 20:56:44 +01:00
9570-feat-nmcli-add-fail-over-mac-parameter.yml [PR #9571/d6863eae backport][stable-10] feat(nmcli): support the fail_over_mac parameter (#9594) 2025-01-21 21:04:10 +01:00
9573-iocage-inventory-sudo.yml [PR #9573/8f299761 backport][stable-10] Implement #9572 Add parameter sudo to inventory plugin iocage (#9605) 2025-01-22 20:51:37 +01:00
9577-mh-delegate-debug.yml [PR #9577/7fa859a3 backport][stable-10] module helper: delegate debug() to AnsibleModule (#9591) 2025-01-20 20:03:59 +01:00
9578-redhat_subscription-no-remove-on-unregister.yml [PR #9578/bcc92e8a backport][stable-10] redhat_subscription: stop manual unsubscribing on unregistration (#9590) 2025-01-20 19:47:22 +01:00
9579-with-open.yml [PR #9579/0de39a6f backport][stable-10] use open() as context manager (#9596) 2025-01-21 21:04:28 +01:00
9582-add-support-for-vrrp.yml [PR #9582/c5cc9494 backport][stable-10] ufw: added support for vrrp protocol (#9595) 2025-01-21 21:04:19 +01:00
9583-py3-imports-actionbecomecachecallback.yml [PR #9583/81e22180 backport][stable-10] action/become/cache/callback: adjust import __future__ for Python3 (#9586) 2025-01-20 20:15:52 +01:00
9584-py3-imports-connectioninventory.yml [PR #9584/bd864c45 backport][stable-10] connection/inventory: adjust import __future__ for Python3 (#9587) 2025-01-20 19:47:33 +01:00
9585-py3-imports-filter.yml [PR #9585/b85d36a0 backport][stable-10] filter plugins: adjust import __future__ for Python3, remove __metaclass__ (#9588) 2025-01-20 20:00:22 +01:00
9586-allow-transition-id-jira.yml [PR #9602/6d5aa4ae backport][stable-10] allow jira transition with target id (#9626) 2025-01-26 13:15:01 +01:00
9598-snap-version.yml [PR #9598/f27d5e7a backport][stable-10] snap: add RV version (#9606) 2025-01-22 20:51:27 +01:00
9599-apache2-mod-proxy-revamp1.yml [PR #9599/1c0b487b backport][stable-10] apache2-mod-proxy: refactor BalancerMember serialization (#9607) 2025-01-22 20:51:20 +01:00
9600-apache2-mod-proxy-revamp2.yml [PR #9600/a4562bce backport][stable-10] apache2-mod-proxy: make state option a list (#9611) 2025-01-23 20:10:51 +01:00
9601-proxmox-template-support-for-checksums.yml [PR #9601/b9299e63 backport][stable-10] proxmox_template: Add optional checksum validation (#9624) 2025-01-25 10:32:43 +01:00
9608-apache2-mod-proxy-revamp3.yml [PR #9608/d7f067dd backport][stable-10] apache2-mod-proxy: receive results from fetch_url as tuple of vars (#9610) 2025-01-23 20:10:42 +01:00
9609-apache2-mod-proxy-revamp4.yml [PR #9609/bf5c7f8b backport][stable-10] apache2-mod-proxy: better handling regexp extraction (#9616) 2025-01-23 20:40:33 +01:00
9612-apache2-mod-proxy-revamp5.yml [PR #9612/f5cbf5ac backport][stable-10] apache2-mod-proxy: use deps to handle dependencies (#9617) 2025-01-23 20:47:59 +01:00
9614-apache2-mod-proxy-revamp7.yml [PR #9614/cc331db4 backport][stable-10] apache2-mod-proxy: simplified/improved string manipulation (#9627) 2025-01-26 13:14:54 +01:00
9621-keycloak_client-sanitize-saml-encryption-key.yml [PR #9621/fb4f7248 backport][stable-10] keycloak_client: sanitize saml.encryption.private.key (#9630) 2025-01-26 13:22:56 +01:00