If a user has a credential with userLabel "initial" as the only credential, then this will result in unnecessary updates to the user on re-execution.
Background: Once the user has been created in keycloak, the existing user is retrieved for comparison. Before the comparison, the credential with userLabel "initial" is removed. Thereby the user object from the local configuration has an empty list as credential. The Keycloak API responds with null. The comparison therefore detects a difference and an update is performed again.
Expected Behavior
Somehow recognise null and empty list as "same".
Steps To Reproduce
1. Definition of a user in yaml/json, containing a credential with userLabel "initial"
2. Run Import
3. Change the file, but not the user definition to make the import logic start again
4. Run Import
5. See UPDATE USER Event for the user not changed.
Current Behavior
If a user has a credential with userLabel "initial" as the only credential, then this will result in unnecessary updates to the user on re-execution.
Background: Once the user has been created in keycloak, the existing user is retrieved for comparison. Before the comparison, the credential with userLabel "initial" is removed. Thereby the user object from the local configuration has an empty list as credential. The Keycloak API responds with null. The comparison therefore detects a difference and an update is performed again.
Expected Behavior
Somehow recognise null and empty list as "same".
Steps To Reproduce
Environment
Anything else?