By: Joel Potts user 30 Jun 2016 at 3:35 a.m. CDT

0 Responses
Joel Potts gravatar
I am currently experiencing issues with SCIM, when trying to get a UMA ticket. I am following the [Testing SCIM UMA](https://www.gluu.org/docs/integrate/scimuma-howto/) how to on the documentation site. My code is as follows: ``` try { ResteasyProviderFactory instance=ResteasyProviderFactory.getInstance(); RegisterBuiltin.register(instance); instance.registerProvider(ResteasyJacksonProvider.class); String domain = "https://mydomain.com/identity/seam/resource/restv1"; String metadataUrl = "https://mydomain.com/.well-known/uma-configuration"; String clientJwks = FileUtils.readFileToString(new File("C:\\Users\\qw006351\\Documents\\scim-rp-openid-keys.json")); String clientKeyId = "81421830-fe03-4480-af9a-0eb921d30433"; //System.out.println(clientJwks); /* System.out.println("keyId = " + KEY_ID); System.out.println("algorithm = " + ALGORITHM); System.out.println("exponent = " + EXPONENT); System.out.println("modulus = " + MODULUS); System.out.println("private key = " + PRIVATE_KEY); System.out.println("d = " + D); System.out.println("json web key set = " + JSON_WEB_KEY_SET); */ ScimResponse res; ScimClient client = ScimClient.umaInstance(domain, metadataUrl, SCIM_RP_CLIENT_ID, clientJwks, clientKeyId); res = client.retrievePerson("gluutest", MediaType.APPLICATION_JSON); System.out.println(res.getResponseBodyString()); } catch (HttpException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } ``` And when it runs, I get the following errer: ``` Exception in thread "main" gluu.scim.client.exception.ScimInitializationException: UMA ticket is invalid at gluu.scim.client.auth.UmaScimClientImpl.autorizeRpt(UmaScimClientImpl.java:182) at gluu.scim.client.auth.UmaScimClientImpl.retrievePerson(UmaScimClientImpl.java:224) at gluu.scim.client.ScimClient.retrievePerson(ScimClient.java:51) at test.Main.main(Main.java:99) Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "errors" (Class org.xdi.oxauth.model.uma.PermissionTicket), not marked as ignorable at [Source: [B@64e7619d; line: 1, column: 12] (through reference chain: org.xdi.oxauth.model.uma.PermissionTicket["errors"]) at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53) at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267) at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673) at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659) at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365) at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725) at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703) at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1935) at gluu.scim.client.auth.UmaScimClientImpl.autorizeRpt(UmaScimClientImpl.java:180) ... 3 more ``` Any advice? (I am using GLUU Server 2.4.3 and SCIM-Client-2.4.3.Final.jar) **EDIT:** Per your previous request I updated to the most recent version of the server. I forgot to set SCIM Support to Enabled. I am not getting errors now (sort of) I get a response from SCIM saying: {"errors":[{"description":"Resource gluutest not found","code":404,"uri":""}]} **EDIT 2:** I just figured out the search takes the iNum value for the user rather than the uID and everything seems to be working.