1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-21 20:59:10 +00:00
community.general/changelogs/fragments/keycloak-realm-key-keyerror-bugfix.yml
Ivan Kokalovic 106817316d
keycloak_realm_key: handle missing config fields for default keys (#11470)
* fix(keycloak_realm_key): handle missing config fields for default keys

Keycloak API may not return 'active', 'enabled', or 'algorithm' fields
in the config response for default/auto-generated realm keys. This caused
a KeyError when the module tried to compare these fields during state
detection.

Use .get() with the expected value as default to handle missing fields
gracefully, treating them as unchanged if not present in the API response.

Fixes: #11459

* add PR link to changelog entry per review feedback
2026-02-07 16:21:32 +01:00

5 lines
340 B
YAML

bugfixes:
- keycloak_realm_key - fix ``KeyError`` crash when managing realm keys where Keycloak
does not return ``active``, ``enabled``, or ``algorithm`` fields in the config
response (https://github.com/ansible-collections/community.general/issues/11459,
https://github.com/ansible-collections/community.general/pull/11470).