Files
community.general/plugins/modules
Mark Armstrong af0118278b 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)
2025-01-26 15:23:39 +01:00
..
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-31 12:47:19 +13:00
2024-12-31 12:47:19 +13:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:15 +01:00
2024-12-27 14:29:05 +01:00
2024-12-29 13:29:58 +01:00
2024-12-27 14:29:05 +01:00
2024-12-27 14:29:05 +01:00
2024-12-27 14:29:05 +01:00
2024-12-27 14:29:05 +01:00
2024-12-27 14:29:05 +01:00
2025-01-07 06:30:03 +01:00
2024-12-26 21:53:20 +01:00
2025-01-07 06:30:03 +01:00
2024-12-29 13:42:22 +01:00
2024-12-29 13:30:26 +01:00
2024-12-26 21:53:20 +01:00
2024-12-26 21:53:20 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2024-12-29 13:29:58 +01:00
2024-12-26 21:54:03 +01:00
2024-12-26 21:54:03 +01:00
2025-01-07 06:30:03 +01:00
2024-12-26 21:55:56 +01:00
2025-01-07 06:30:03 +01:00
2025-01-07 06:30:03 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-29 13:42:22 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2024-12-26 21:55:56 +01:00
2025-01-07 06:30:03 +01:00
2024-12-26 21:52:26 +01:00
2025-01-07 06:30:03 +01:00
2024-12-26 21:52:26 +01:00
2024-12-26 21:52:26 +01:00
2024-12-29 13:29:58 +01:00
2024-12-26 13:40:05 +01:00
2024-12-29 13:29:58 +01:00
2025-01-06 21:31:59 +01:00
2024-12-26 13:42:44 +01:00
2025-01-06 21:31:59 +01:00
2025-01-06 21:31:59 +01:00
2025-01-06 21:31:59 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 09:12:05 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 09:12:05 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 09:12:05 +01:00
2024-12-26 09:12:05 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 09:12:05 +01:00
2024-12-26 09:12:05 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2024-12-29 13:29:58 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 13:40:55 +01:00
2024-12-26 13:40:55 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2025-01-07 06:28:00 +01:00
2024-12-26 13:41:54 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2025-01-12 13:03:26 +01:00
2024-12-26 08:22:24 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 22:48:04 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 22:48:04 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 21:19:49 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 21:19:49 +01:00
2024-12-25 21:19:49 +01:00
2024-12-25 21:19:49 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 21:19:49 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 21:19:49 +01:00
2024-12-25 21:19:49 +01:00
2025-01-08 20:41:03 +01:00
2024-12-25 21:16:10 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2024-12-26 08:22:58 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2025-01-03 22:52:09 +01:00
2024-12-26 08:22:58 +01:00
2024-12-26 08:22:58 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2024-12-26 08:22:58 +01:00
2025-01-22 20:04:38 +01:00
2025-01-22 20:04:38 +01:00
2025-01-03 20:00:45 +01:00
2024-12-25 09:48:22 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2024-12-25 09:48:22 +01:00
2024-12-29 00:25:12 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2024-12-25 09:48:22 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2024-12-25 09:48:22 +01:00
2024-12-25 09:48:22 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2024-12-29 00:25:12 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2025-01-03 20:00:45 +01:00
2025-01-04 11:04:51 +01:00
2025-01-04 11:04:51 +01:00
2025-01-04 11:04:51 +01:00
2025-01-04 11:04:51 +01:00
2025-01-04 11:04:51 +01:00
2024-12-24 12:00:30 +01:00
2024-12-23 21:30:11 +01:00
2025-01-04 11:04:51 +01:00
2025-01-04 11:04:51 +01:00
2024-12-23 09:28:05 +01:00
2025-01-04 11:04:51 +01:00
2024-12-29 00:25:12 +01:00
2024-12-23 09:28:05 +01:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2024-12-23 18:58:02 +01:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2024-12-23 18:58:02 +01:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00
2025-01-04 12:29:34 +13:00