Would be good to have backwards compatibility, but:
* Adding to reps wouldn't help for admin client 2.5.5, and we're not doing
a new release of the admin client for 2.5.x.
* Server side shouldn't ignore unknown fields as that could mask issues.
For instance a typing error would just result in ignoring rather than an
error.
On 28 September 2017 at 10:11, Thomas Darimont <
thomas.darimont(a)googlemail.com> wrote:
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@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)
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev