By: Master Kumar user 01 Oct 2018 at 4:30 p.m. CDT

8 Responses
Master Kumar gravatar
As per the gluu 3.1.3 documentation enabled the SCIM, uma_client_authz_rpt_policy. Was trying to use the sample code (TestScimClient) and test but its giving the below error javax.ws.rs.ProcessingException: org.codehaus.jackson.JsonParseException: Unrecognized token 'No': was expecting at [Source: java.io.InputStreamReader@2a898881; line: 1, column: 3] at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:282) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:178) at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:218) at com.myinno.mygluu.TestScimUmaClient.simpleSearch(TestScimUmaClient.java:32) at com.myinno.mygluu.TestScimUmaClient.main(TestScimUmaClient.java:63) Caused by: org.codehaus.jackson.JsonParseException: Unrecognized token 'No': was expecting at [Source: java.io.InputStreamReader@2a898881; line: 1, column: 3] at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) at org.codehaus.jackson.impl.ReaderBasedParser._reportInvalidToken(ReaderBasedParser.java:1812) at org.codehaus.jackson.impl.ReaderBasedParser._matchToken(ReaderBasedParser.java:1644) at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1184) at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485) at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1893) at gluu.scim2.client.rest.provider.ListResponseProvider.readFrom(ListResponseProvider.java:65) at gluu.scim2.client.rest.provider.ListResponseProvider.readFrom(ListResponseProvider.java:46) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:248) ... 4 more Exception : org.codehaus.jackson.JsonParseException: Unrecognized token 'No': was expecting at [Source: java.io.InputStreamReader@2a898881; line: 1, column: 3]

By Jose Gonzalez staff 02 Oct 2018 at 9:52 a.m. CDT

Jose Gonzalez gravatar
Hi, There must be some misconfig around. Can you do this?: - print the actual response from server, eg `logger.debug(response.readEntity(String.class))` - attach files `/opt/gluu/jetty/oxauth/logs/oxauth_script.log`, `/opt/gluu/jetty/identity/logs/oxtrust.log` after the test is run - attach the log statements generated by your program (use DEBUG level). The client internally uses log4j2, so there must be a lot of clues there

By Master Kumar user 02 Oct 2018 at 12:57 p.m. CDT

Master Kumar gravatar
I see only below in the identity logs and nothing in oxauth ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,617 INFO [qtp1007309018-75972] [gluu.oxtrust.service.scim2.interceptor.ServiceMetadataFilter] (ServiceMetadataFilter.java:36) - ==== SCIM Service metadata call intercepted ==== ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,617 INFO [qtp1007309018-75972] [gluu.oxtrust.service.scim2.interceptor.ServiceMetadataFilter] (ServiceMetadataFilter.java:36) - ==== SCIM Service metadata call intercepted ==== Also i see this 2018-10-02 23:26:10,480 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream client.getServiceProviderConfig().getStatus(): 200 response.getStatus() : 500 ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,618 INFO [qtp1007309018-75972] [gluu.oxtrust.service.scim2.serialization.ScimResourceSerializer] (ScimResourceSerializer.java:117) - buildIncludeSet. No attributes neither excludedAttributes query param were passed ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,618 INFO [qtp1007309018-75972] [gluu.oxtrust.service.scim2.serialization.ScimResourceSerializer] (ScimResourceSerializer.java:117) - buildIncludeSet. No attributes neither excludedAttributes query param were passed ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,708 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.filter.AuthorizationProcessingFilter] (AuthorizationProcessingFilter.java:78) - Path is protected, proceeding with authorization processing... ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,708 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.filter.AuthorizationProcessingFilter] (AuthorizationProcessingFilter.java:78) - Path is protected, proceeding with authorization processing... ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,708 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:107) - ==== SCIM Service call intercepted ==== ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,708 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:107) - ==== SCIM Service call intercepted ==== ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,709 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:108) - Authorization header not found ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,709 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:108) - Authorization header not found ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,711 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:113) - SCIM Test Mode is ACTIVE ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,711 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:113) - SCIM Test Mode is ACTIVE ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/oxtrust.log <== 2018-10-02 15:21:22,712 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:152) - Request is missing authorization header ==> /opt/gluu-server-3.1.3/opt/gluu/jetty/identity/logs/2018_10_02.jetty.log <== 2018-10-02 15:21:22,712 INFO [qtp1007309018-72222] [org.gluu.oxtrust.service.uma.ScimUmaProtectionService] (ScimUmaProtectionService.java:152) - Request is missing authorization header

By Master Kumar user 02 Oct 2018 at 1:06 p.m. CDT

Master Kumar gravatar
In the java SCIM Uma Client(https://gluu.org/docs/ce/3.1.3/user-management/scim2/#testing-with-the-scim-client-uma) i have given below values in the code private String domain = "https://myglu.server.com/identity/restv1"; // private String umaMetaDataUrl = "https://myglu.server.com/.well-known/uma2-configuration"; private String umaAatClientId = "@!xxxxxxx"; private String umaAatClientJksPath = "profiles/default/scim-rp.jks"; private String umaAatClientJksPassword = "secret"; private String umaAatClientKeyId = "";

By Jose Gonzalez staff 03 Oct 2018 at 10:09 a.m. CDT

Jose Gonzalez gravatar
> SCIM Test Mode is ACTIVE It seems you have test mode active, turn it off: in oxtrust go to `Configuration` > `JSON Configuration` > `OxTrust Configuration`, scroll down and set the `scimTestMode` property to false. Try run your code again after that. There are only two modes: Protection Using UMA or Using Test Mode. There are mutually exclusive.

By Jose Gonzalez staff 05 Oct 2018 at 7:13 a.m. CDT

Jose Gonzalez gravatar
I'm closing this ticket, reopen if needed

By Master Kumar user 08 Oct 2018 at 8:01 a.m. CDT

Master Kumar gravatar
I didn't find an option to change the status of the ticket. I have tested the code by setting testmode to false and still its failing. Here is the error 2018-10-08 18:24:45,003 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream client.getServiceProviderConfig().getStatus(): 200 response.getEntity()=null response.getStatus() : 500 javax.ws.rs.ProcessingException: org.codehaus.jackson.JsonParseException: Unexpected character ('R' (code 82)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.InputStreamReader@3b7b05a8; line: 1, column: 2] at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:282) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:178) at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:218) at TestScimUmaClient.simpleSearch(TestScimUmaClient.java:36) at TestScimUmaClient.main(TestScimUmaClient.java:66) Caused by: org.codehaus.jackson.JsonParseException: Unexpected character ('R' (code 82)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.InputStreamReader@3b7b05a8; line: 1, column: 2]

By Jose Gonzalez staff 08 Oct 2018 at 12:14 p.m. CDT

Jose Gonzalez gravatar
Can you share with us more information?, otherwise it would be very hard to help > print the actual response from server, eg logger.debug(response.readEntity(String.class)) > attach files /opt/gluu/jetty/oxauth/logs/oxauth_script.log

By Master Kumar user 10 Oct 2018 at 6:12 a.m. CDT

Master Kumar gravatar
While running the client program getting below error on the console client.getServiceProviderConfig().getStatus(): 200 response.getStatus(): 500 javax.ws.rs.ProcessingException: org.codehaus.jackson.JsonParseException: Unexpected character ('R' (code 82)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.InputStreamReader@2eee3069; line: 1, column: 2] at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:282) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:178) at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:218) at com.test.mygluu.TestScimUmaClient.simpleSearch(TestScimUmaClient.java:35) **oxauth.log shows** 2018-10-10 08:05:23,024 INFO [qtp1007309018-178] [org.xdi.oxauth.auth.Authenticator] (Authenticator.java:217) - Authentication success for Client: '@!F157.0A5B.9A76.6A7D!0001!2063.8249!0008!BD61.4873.BBF7.0E2C' 2018-10-10 08:05:23,057 INFO [qtp1007309018-7239] [org.xdi.oxauth.auth.Authenticator] (Authenticator.java:217) - Authentication success for Client: '@!F157.0A5B.9A76.6A7D!0001!2063.8249!0008!BD61.4873.BBF7.0E2C' 2018-10-10 08:05:23,200 INFO [qtp1007309018-74] [org.xdi.oxauth.auth.Authenticator] (Authenticator.java:217) - Authentication success for Client: '@!F157.0A5B.9A76.6A7D!0001!2063.8249!0008!02EC.46C8' 2018-10-10 08:05:23,230 ERROR [qtp1007309018-7240] [org.xdi.oxauth.uma.service.UmaRptService] (UmaRptService.java:104) - Failed to find RPT by code: a581e789-79d5-48aa-990b-026acb26c100 2018-10-10 08:05:23,249 ERROR [qtp1007309018-6898] [xdi.oxauth.uma.ws.rs.UmaPermissionRegistrationWS] (UmaPermissionRegistrationWS.java:134) - Failed to parse uma permission request java.io.EOFException: No content to map to Object due to end of input at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2775) ~[jackson-mapper-asl-1.9.11.jar:1.9.11] at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718) ~[jackson-mapper-asl-1.9.11.jar:1.9.11] at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863) ~[jackson-mapper-asl-1.9.11.jar:1.9.11] at org.xdi.oxauth.uma.ws.rs.UmaPermissionRegistrationWS.parseRequest(UmaPermissionRegistrationWS.java:128) [classes/:?] at org.xdi.oxauth.uma.ws.rs.UmaPermissionRegistrationWS.registerPermission(UmaPermissionRegistrationWS.java:93) [classes/:?] at org.xdi.oxauth.uma.ws.rs.UmaPermissionRegistrationWS$Proxy$_$$_WeldClientProxy.registerPermission(Unknown Source) [classes/:?] at sun.reflect.GeneratedMethodAccessor286.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final]