By: yoom nguyen user 16 Dec 2015 at 11:37 a.m. CST

7 Responses
yoom nguyen gravatar
Using GLUU version gluu-server-2.1.0-0.el6.x86_64.rpm We are trying to query or retrieval a "mail" attribute from the ldap database. BY using this ldapsearch we are able to retrieval two records for the mail=sati@gmm.com /opt/opendj/bin/ldapsearch -h localhost -p 1389 -D "cn=directory manager" -w Mo0chine1 -b "o=gluu" "mail=sati@gmm.com" However, when using SCIM client it will only able to retrieval one record. Here is the simple code that we use for retrieval data using SCIM method. Any suggestion to get both ldap records through SCIM? ******************************************************** ScimClient client = createScimClient("admin", "xxxxxxx"); ScimResponse response; try { response = client.personSearch("mail", email, MediaType.APPLICATION_JSON); } catch (IOException | JAXBException e) { throw new PortalException(e, PortalException.SEVERITY_LEVEL_2); } System.out.println(response.getResponseBodyString()); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ private static ScimClient createScimClient(String email, String password) { ScimClient client = ScimClient.oAuthInstance(email, password, "@!C032.849B.2FA5.5E8C!0001!BCB6.4A42!0008!4ACB.875B", "987654321", "https://idm.gmm.com/identity/seam/resource/restv1", "https://idm.gmm.com/oxauth/seam/resource/restv1/oxauth/token"); return client; } Thanks, Yoom

By Michael Schwartz Account Admin 16 Dec 2015 at 11:48 a.m. CST

Michael Schwartz gravatar
Definitely going to recommend upgarding the Gluu Server. Unfortunately, there is no easy upgrade path right now, although I am working on some [https://github.com/GluuFederation/community-edition-setup/tree/master/static/scripts](scripts) that might work for version 2.1 also--see import23.py and export23.py. Also, SCIM 2.0 is out in version 2.4. We updated the security of SCIM to require more secure client authentication, and in fact it requires an UMA RPT token. You should take a look at this wiki page: http://ox.gluu.org/doku.php?id=ce_24_scim_uma

By yoom nguyen user 16 Dec 2015 at 3:20 p.m. CST

yoom nguyen gravatar
Would you test and see if it work for version 2.4 Meaning, SCIM will return multiple records when there is a matched. Also, what is the right search control for Java to pull back multiple records. Or is this an API problem for the remote query. Thanks

By Michael Schwartz Account Admin 16 Dec 2015 at 4:30 p.m. CST

Michael Schwartz gravatar
I'm asking one of developers to look at it, but I don't have an ETA for you.

By Aliaksandr Samuseu staff 17 Dec 2015 at 7:30 a.m. CST

Aliaksandr Samuseu gravatar
Hi, Yoom. This is just a wild gues, but could you try to visit "Configuration -> Attributes", open attribute "Email" for editing and make sure "Multivalued" property of it set to "True" if it isn't, then retry your SCIM request? Regards, Alex.

By yoom nguyen user 17 Dec 2015 at 8:37 a.m. CST

yoom nguyen gravatar
"Configuration -> Attributes", open attribute "Email" for editing and make sure "Multivalued" property of it set to "True" Yes, the configuration's value was set to YES. The SCIM api is not working but the ldapsearch command is working. Thanks, Yoom

By shekhar laad staff 20 Jan 2016 at 11:28 a.m. CST

shekhar laad gravatar
Hi Yoom, We fixed the issue in the latest version, now you should try with new api searchPersons and it will return list for you.

By shekhar laad staff 21 Jan 2016 at 9:20 a.m. CST

shekhar laad gravatar
if it will not works,please share the oxtrust.log ans oxauth.log file .so that we can resolve it quickly. Thanx.