0

I'm trying to update an user information created in WSO2 Identity Server having LDAP as user store and using SCIM Client Java Application. Consuming SCIM Rest Endpoints from JAVA Client Application

I've configured the certificates and hostname to this application and tested the CreateUser class with the "hasini@gmail.com" user and it worked.

enter image description here

My problem is when I try to use the UpdateUser class for this user. WSO2IS server shows an error:

[2021-06-24 14:57:15,979] [f9d70e10-be8c-4f84-944f-394070b187db] ERROR {org.wso2.charon.core.protocol.endpoints.UserResourceEndpoint} - 
Internal Server Error while updating User org.wso2.charon.core.exceptions.CharonException: 
Error while updating attributes of user: hasini@gmail.com
    at org.wso2.carbon.identity.scim.provider.impl.SCIMUserManager.updateUser(SCIMUserManager.java:570)
    at org.wso2.charon.core.protocol.endpoints.UserResourceEndpoint.updateWithPUT(UserResourceEndpoint.java:546)
    at org.wso2.carbon.identity.scim.provider.resources.UserResource.updateUser(UserResource.java:268)
    at jdk.internal.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Caused by: org.wso2.carbon.user.core.UserStoreException: Profile information could not be updated in LDAP user store for user : hasini@gmail.com
    at org.wso2.carbon.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:205)
    at org.wso2.carbon.user.core.common.AbstractUserStoreManager.deleteUserClaimValue(AbstractUserStoreManager.java:4116)
    at org.wso2.carbon.identity.scim.provider.impl.SCIMUserManager.updateUser(SCIMUserManager.java:554)
    ... 63 more
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at org.wso2.carbon.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:191)
    ... 65 more
Caused by: org.wso2.carbon.user.core.UserStoreException: Profile information could not be updated in LDAP user store for user : hasini@gmail.com
    at org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.handleException(ReadWriteLDAPUserStoreManager.java:2135)
    at org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doDeleteUserClaimValue(ReadWriteLDAPUserStoreManager.java:1081)
    at org.wso2.carbon.user.core.common.AbstractUserStoreManager.deleteUserClaimValue(AbstractUserStoreManager.java:4177)
    ... 72 more
Caused by: javax.naming.InvalidNameException: mail=hasini@gmail.com: 
[LDAP: error code 64 - naming attribute 'mail' is not present in entry]; remaining name 'mail=hasini@gmail.com'
    at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3097)
    at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2895)
    at java.naming/com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1409)
    at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:257)
    at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:167)
    at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:156)
    at org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doDeleteUserClaimValue(ReadWriteLDAPUserStoreManager.java:1077)
    ... 73 more

pom.xml:

<parent>
   <groupId>org.wso2.samples.is</groupId>
   <artifactId>wso2is-identity-samples-scim</artifactId>
   <version>4.3.7-SNAPSHOT</version>
   <relativePath>../pom.xml</relativePath>
</parent>

Is it the best way to integrate a React Application with WSO2-Identity Server or there is a better way? I want to create, update, delete, change user's password, etc, by my application.

Community
  • 1
  • 1
Aldo Inácio da Silva
  • 824
  • 2
  • 14
  • 38

1 Answers1

1

If you are trying to integrate React Application with WSO2 IS, it would be better if you can make use of SCIM REST endpoints 1 for create, update, delete, change user's password

FYI you can refer 2 3, React application developed by WSO2 IS.

Inthirakumaaran
  • 369
  • 1
  • 8