KEYCLOAK-705 and 687