By: Kévin P. user 27 Feb 2018 at 6:08 a.m. CST

1 Response
Kévin P. gravatar
Hello, I'm trying to update the `emailVerified` attribute of a user using SCIM, but I get an error with this specific field and I don't know why. I've activated 2 attributes (`o` and `emailVerified`) via oxTrust (`Configuration` > `Attributes`) setting "SCIM Attribute" to "True". I end-up with the following schema: ```json { "id": "urn:ietf:params:scim:schemas:extension:gluu:2.0:User", "externalId": null, "meta": { "created": null, "lastModified": null, "location": "https://auth.perais.fr/identity/restv1/scim/v2/Schemas/urn:ietf:params:scim:schemas:extension:gluu:2.0:User", "version": null, "resourceType": "Schema" }, "name": "GluuUserCustomExtension", "description": "Gluu User Custom Extension", "attributes": [ { "name": "emailVerified", "type": "string", "description": "True if the End-User's e-mail address has been verified; otherwise false", "required": false, "multiValued": false, "caseExact": false, "mutability": "readWrite", "returned": "default", "uniqueness": "none", "subAttributes": [], "referenceTypes": [] }, { "name": "o", "type": "decimal", "description": "Organization SIREN number", "required": false, "multiValued": false, "caseExact": false, "mutability": "readWrite", "returned": "default", "uniqueness": "none", "subAttributes": [], "referenceTypes": [] } ] } ``` The update query content I'm running is: ```json { "schemas":[ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:gluu:2.0:User" ], "urn:ietf:params:scim:schemas:extension:gluu:2.0:User": { "emailVerified": false } } ``` And get the following error: ``` 2018-02-27 11:54:53,883 INFO [qtp474675244-18] [oxtrust.service.scim2.jackson.custom.UserDeserializer] (UserDeserializer.java:45) - deserialize() ======don't know what is emailVerified 2018-02-27 11:54:53,897 INFO [qtp474675244-18] [oxtrust.service.scim2.jackson.custom.ExtensionDeserializer] (ExtensionDeserializer.java:52) - deserialize() 2018-02-27 11:54:53,916 INFO [qtp474675244-18] [oxtrust.service.scim2.jackson.custom.ExtensionDeserializer] (ExtensionDeserializer.java:146) - NO MATCH: attributeDataType.getDisplayName() = Boolean java.lang.IllegalArgumentException: JSON type not supported: false at org.gluu.oxtrust.service.scim2.jackson.custom.ExtensionDeserializer.deserialize(ExtensionDeserializer.java:147) at org.gluu.oxtrust.service.scim2.jackson.custom.ExtensionDeserializer.deserialize(ExtensionDeserializer.java:40) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) at org.gluu.oxtrust.service.scim2.jackson.custom.UserDeserializer.deserialize(UserDeserializer.java:77) at org.gluu.oxtrust.service.scim2.jackson.custom.UserDeserializer.deserialize(UserDeserializer.java:36) at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2704) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1315) at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:419) at org.gluu.oxtrust.service.scim2.jackson.provider.CustomJacksonProviderScim2$Proxy$_$$_WeldClientProxy.readFrom(Unknown Source) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66) at org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:61) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56) at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:123) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:59) at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:151) at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:92) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:115) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:193) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:534) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:745) ``` Note that there is no error when updating `o` attribute. The following request works well: ```json { "schemas":[ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:gluu:2.0:User" ], "urn:ietf:params:scim:schemas:extension:gluu:2.0:User": { "o": "123456789" } } ```

By Jose Gonzalez staff 05 Mar 2018 at 6:04 a.m. CST

Jose Gonzalez gravatar
Hi Kévin, As you show in the schema, `emailVerified` is of type `string`. For your update you are supplying a boolean value which we don't support for custom SCIM attributes in 3.1.2 (see "Creating your own attributes" in the [doc page](https://www.gluu.org/docs/ce/user-management/scim2/)). The exception shown is already giving some clues about this... To deal with the situation, just pass `"false"` or `"true"`.