[keycloak-dev] Incompatiblity of UserRepresentation (and other Reps) between 2.5.5.Final and 3.3.0.CR2
Thomas Darimont
thomas.darimont at googlemail.com
Thu Sep 28 04:11:41 EDT 2017
Hello,
I just noticed that it isn't possible to create a user with the old
keycloak admin client (2.5.5.Final)
on the Keycloak Server (3.3.0.CR2). See the exception below.
It turns out that the recently introduced field "notBefore" on
UserRepresentation in KEYCLOAK-5293 is the cause.
Other representations like ClientRepresentation (unknown field "access")
and ProviderRepresentation (unknown field "order")
have the same problem.
How about adding... @JsonIgnoreProperties(ignoreUnknown = true) ... to all
representations (org.keycloak.representations.idm.*) to stay backwards
compatible for old clients?
I gave this a spin locally (by patching the keycloak-core jar) and it is
working fine.
Cheers,
Thomas
javax.ws.rs.client.ResponseProcessingException:
javax.ws.rs.ProcessingException:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
Unrecognized field "notBefore" (class
org.keycloak.representations.idm.UserRepresentation), not marked as
ignorable (24 known properties: "disableableCredentialTypes", "enabled",
"emailVerified", "origin", "self", "applicationRoles", "createdTimestamp",
"clientRoles", "groups", "username", "totp", "id", "email",
"federationLink", "serviceAccountClientId", "lastName", "clientConsents",
"socialLinks", "realmRoles", "attributes", "firstName", "credentials",
"requiredActions", "federatedIdentities"])
at [Source: org.apache.http.conn.EofSensorInputStream at 2663e964; line: 1,
column: 308] (through reference chain:
java.util.ArrayList[0]->org.keycloak.representations.idm.UserRepresentation["notBefore"])
at
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:141)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:59)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
at
org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:64)
at com.sun.proxy.$Proxy32.search(Unknown Source)
More information about the keycloak-dev
mailing list