mayope / keycloakmigration

Manage your Keycloak configuration with code.
https://mayope.net
MIT License
111 stars 23 forks source link

Using deprecated 'credentials' format in JSON representation #49

Closed 0x0dr1y closed 1 year ago

0x0dr1y commented 2 years ago

Whenever you use

- updateUserPassword:
    name: testUser
    password: "test"

Keycloak will throw the following warning: Using deprecated 'credentials' format in JSON representation for user 'USER'. It will be removed in future versions"

They changed the format a few versions ago, so it also should be adjusted in keycloakmigration:

https://github.com/keycloak/keycloak/blob/main/server-spi-private/src/main/java/org/keycloak/models/utils/RepresentationToModel.java#L227

klg71 commented 2 years ago

Hey @MrDeerly thank you for bringing it up. I looked into it and I guess we can replace the old functionality with the reset-password endpoint in the admin api. This will however break the Migration Hashes for UpdateUserPasswordAction if you specified a salt. That means you will have to run the correctHashes method to fix the invalid hash. Do you have any remarks to this solution?

klg71 commented 1 year ago

released with 0.2.39