By: Sakit Atakishiyev user 05 Jun 2018 at 12:43 a.m. CDT

9 Responses
Sakit Atakishiyev gravatar
Hello everyone. Today I tested that can I change username with exist username on the ldap. With SCIM it not possible. For examlpe I create two users with `username_A` and `username_B`. Then just for testing I update my second user's username to `username_A` with scim api. Api returns me duplicate UID error. It is normal behaviour. But when I try to update my second user's username to `username_A` on `oxTrust UI` process finish with success. It seems that oxTrust UI does not check `UID`uniqueness. My users have `userCertificate` attribute without any custom validation(I disabled). When I change this attribute with scim api there is no any problem. But when I try to change this attribute with oxTrust UI I got the below error ``` User certificate should not exceed 400 symbols ``` But i have not any custom validation for this attribute

By Thomas Gasmyr Mougang staff 05 Jun 2018 at 2:29 a.m. CDT

Thomas Gasmyr Mougang gravatar
Hi Sakit, If i add two users using oxTrust Ui and then try to switch their username then the duplicate UID error is display. So my question is: Have you add both users using SCIM or oxTrust UI?

By Thomas Gasmyr Mougang staff 05 Jun 2018 at 2:48 a.m. CDT

Thomas Gasmyr Mougang gravatar
Sorry, we are not able to reproduce the issue even when both are added using scim . Can you share more information?

By Sakit Atakishiyev user 05 Jun 2018 at 3:06 a.m. CDT

Sakit Atakishiyev gravatar
I created one user with scim. The second one with dynamic script. The code I used like the below ``` new_user = User() new_user.setAttribute("uid", person["USERNAME"]) new_user.setAttribute("mail", person["EMAIL"] + "@example.org") new_user.setAttribute("givenName", person["GIVENNAME"]) new_user.setAttribute("middleName",person["CN"].split()[2]) new_user.setAttribute("sn", person["SURNAME"]) new_user.setAttribute("displayName", person["CN"]) new_user.setAttribute("persistentId", person["SERIALNUMBER"]) new_user.setAttribute("userCertificate", cert) new_user.setAttribute("userPassword", pin) ``` After created these two user I try to set the same uid with scim and I got duplicate error. But when I do this operation with oxTrust UI I can set the same uid two different user. May be my code is not correct

By Thomas Gasmyr Mougang staff 05 Jun 2018 at 3:17 a.m. CDT

Thomas Gasmyr Mougang gravatar
Can you send us a screenshot of both entry in gluu ldap currently? For both users, a screenshot where we can see his attributes. You can also use ldap search to retrieve all details of both users.

By Sakit Atakishiyev user 05 Jun 2018 at 3:42 a.m. CDT

Sakit Atakishiyev gravatar
[users_info](https://drive.google.com/file/d/1M4cfCpTEWcIa9JYakdXHqJLNgTkns5Ax/view?usp=sharing)

By Mohib Zico staff 13 Jun 2018 at 10:58 a.m. CDT

Mohib Zico gravatar
Sahil, I think this require a quick QA; can you please check?

By Sahil Arora user 15 Jun 2018 at 5:21 p.m. CDT

Sahil Arora gravatar
I am on it.

By Sahil Arora user 29 Jun 2018 at 9:27 p.m. CDT

Sahil Arora gravatar
I'm able to reproduce this issue, and going to create an issue on github. Thank you for reporting.

By Sahil Arora user 04 Jul 2018 at 7:56 p.m. CDT

Sahil Arora gravatar
created [this](https://github.com/GluuFederation/oxTrust/issues/1028) issue on github. I am closing this ticket.