By: Arinc Eren user 24 Jun 2021 at 8:12 a.m. CDT

2 Responses
Arinc Eren gravatar
Hello, I am trying to do a PATCH request to SCIM API and in test version. Request URL: `https://<HOST>/identity/restv1/scim/v2/Users/6ca4d063-e82c-4167-bf68-3d4274b3da29` This is the request i am doing: ``` { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:PatchOp" ], "Operations": [ { "op": "add", "value": { "urn:ietf:params:scim:schemas:extension:gluu:2.0:User": { "emailVerified":true } } } ] } ``` The Inum is valid. With this request, I can set the "emailVerified" to true as expected but the response is null: ``` { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "status": "500", "scimType": "", "detail": "Unexpected error: null" } ``` This is the oxtrust.log file log: ``` 2021-06-24 13:09:02,153 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.filter.AuthorizationProcessingFilter] (AuthorizationProcessingFilter.java:69) - REST call to '/scim/v2/Users/6ca4d063-e82c-4167-bf68-3d4274b3da29' intercepted 2021-06-24 13:09:02,154 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.filter.AuthorizationProcessingFilter] (AuthorizationProcessingFilter.java:81) - Path is protected, proceeding with authorization processing... 2021-06-24 13:09:02,155 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:105) - ==== SCIM Service call intercepted ==== 2021-06-24 13:09:02,156 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:106) - Authorization header found 2021-06-24 13:09:02,159 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:111) - SCIM Test Mode is ACTIVE 2021-06-24 13:09:05,470 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.filter.AuthorizationProcessingFilter] (AuthorizationProcessingFilter.java:84) - Authorization passed 2021-06-24 13:09:05,483 INFO [qtp859417998-282203] [gluu.oxtrust.ws.rs.scim2.BaseScimWebService] (BaseScimWebService.java:291) - inspectPatchRequest. Preprocessing of patch request passed 2021-06-24 13:09:05,527 INFO [qtp859417998-282203] [gluu.oxtrust.model.scim2.util.ScimResourceUtil] (ScimResourceUtil.java:463) - adjustPrimarySubAttributes. Revising "primary":true uniqueness constraints 2021-06-24 13:09:05,528 INFO [qtp859417998-282203] [org.gluu.oxtrust.service.scim2.UserPersistenceHelper] (UserPersistenceHelper.java:112) - syncing email ... 2021-06-24 13:09:05,625 ERROR [qtp859417998-282203] [gluu.oxtrust.ws.rs.scim2.UserWebService] (UserWebService.java:329) - Failure at patchUser method java.lang.NullPointerException: null at org.gluu.oxtrust.model.scim.ScimCustomPerson.getAttributeList(ScimCustomPerson.java:102) ~[oxtrust-model-4.0.1.Final.jar:?] at org.gluu.oxtrust.model.scim.ScimCustomPerson.getAttribute(ScimCustomPerson.java:114) ~[oxtrust-model-4.0.1.Final.jar:?] at org.gluu.oxtrust.model.scim.ScimCustomPerson.getUserPassword(ScimCustomPerson.java:91) ~[oxtrust-model-4.0.1.Final.jar:?] at org.gluu.oxtrust.service.scim2.Scim2UserService.transferAttributesToUserResource(Scim2UserService.java:328) ~[classes/:?] at org.gluu.oxtrust.service.scim2.Scim2UserService.replacePersonInfo(Scim2UserService.java:531) ~[classes/:?] at org.gluu.oxtrust.ws.rs.scim2.UserWebService.patchUser(UserWebService.java:316) ~[classes/:?] at org.gluu.oxtrust.ws.rs.scim2.UserWebService$Proxy$_$$_WeldSubclass.patchUser(Unknown Source) ~[classes/:?] at org.gluu.oxtrust.service.scim2.interceptor.UserWebServiceDecorator.patchUser(UserWebServiceDecorator.java:189) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor3039.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.jboss.weld.annotated.runtime.InvokableAnnotatedMethod.invokeOnInstance(InvokableAnnotatedMethod.java:86) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.DecoratorProxyMethodHandler.doInvoke(DecoratorProxyMethodHandler.java:78) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.DecoratorProxyMethodHandler.doInvoke(DecoratorProxyMethodHandler.java:67) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.interceptor.util.proxy.TargetInstanceProxyMethodHandler.invoke(TargetInstanceProxyMethodHandler.java:33) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.TargetBeanInstance.invoke(TargetBeanInstance.java:91) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.gluu.oxtrust.ws.rs.scim2.UserWebService$Proxy$_$$_Weld$Proxy$.patchUser(Unknown Source) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor3038.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:78) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.gluu.oxtrust.service.scim2.interceptor.ReferenceURIInterceptor.manage(ReferenceURIInterceptor.java:70) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor1048.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:81) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68) ~[weld-core-impl-3.1.1.Final.jar:3.1.1.Final] at org.gluu.oxtrust.ws.rs.scim2.UserWebService$Proxy$_$$_WeldSubclass.patchUser(Unknown Source) ~[classes/:?] at org.gluu.oxtrust.ws.rs.scim2.UserWebService$Proxy$_$$_WeldClientProxy.patchUser(Unknown Source) ~[classes/:?] at sun.reflect.GeneratedMethodAccessor3037.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:510) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:401) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:365) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:361) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:367) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:339) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:312) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:441) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:231) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:137) ~[resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:361) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:140) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:217) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.5.1.Final.jar:3.5.1.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [servlet-api-3.1.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:214) [websocket-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1701) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) [jetty-servlet-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1668) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.Server.handle(Server.java:502) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) [jetty-server-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [jetty-io-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) [jetty-util-9.4.15.v20190215.jar:9.4.15.v20190215] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] 2021-06-24 13:09:09,729 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.PairwiseIdService] (PairwiseIdService.java:68) - Current user don't pairwise identifiers 2021-06-24 13:09:09,748 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.AttributeService] (AttributeService.java:472) - Failed to find attribute 'oxTrustActive' metadata 2021-06-24 13:09:09,749 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.AttributeService] (AttributeService.java:472) - Failed to find attribute 'oxTrustEmail' metadata 2021-06-24 13:09:09,750 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.AttributeService] (AttributeService.java:472) - Failed to find attribute 'oxTrustMetaCreated' metadata 2021-06-24 13:09:09,751 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.AttributeService] (AttributeService.java:472) - Failed to find attribute 'oxTrustMetaLastModified' metadata 2021-06-24 13:09:09,751 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.AttributeService] (AttributeService.java:472) - Failed to find attribute 'oxTrustMetaLocation' metadata 2021-06-24 13:09:09,756 WARN [qtp859417998-282203] [org.gluu.oxtrust.ldap.service.Fido2DeviceService] (Fido2DeviceService.java:68) - No fido2 devices enrolled for Average Joe ``` If you can help, I would be appreciated!

By Mohib Zico staff 06 Jul 2021 at 9:08 a.m. CDT

Mohib Zico gravatar
Will test this scenario, PATCH request is very common usage for our SCIM operation....

By Mohib Zico staff 23 Aug 2021 at 8:34 a.m. CDT

Mohib Zico gravatar
Tested in 4.2.3, no issue found.