Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roles cannot be loaded from the MI dashboard when the correlation logs are enabled with -DenableCorrelationLogs=true #4024

Open
Menuka-Senevirathne opened this issue Feb 14, 2025 · 0 comments
Labels

Comments

@Menuka-Senevirathne
Copy link

Description

The following error occurs when attempting to load roles via the dashboard after deleting one of the users who had roles assigned.

[2025-02-07 19:18:32,179] ERROR {Utils} - Error initializing the user store. Please try again later org.wso2.micro.integrator.security.user.core.UserStoreException: Error occurred while accessing Java Security Manager Privilege Block when called by method getUserListOfRole with 1 length of Objects and argTypes [class java.lang.String]
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:193)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.getUserListOfRole(AbstractUserStoreManager.java:4182)
at org.wso2.micro.integrator.management.apis.RoleResource.handleGet(RoleResource.java:123)
at org.wso2.micro.integrator.management.apis.RoleResource.invoke(RoleResource.java:84)
at org.wso2.micro.integrator.management.apis.ApiResourceAdapter.invoke(ApiResourceAdapter.java:55)
at org.wso2.carbon.inbound.endpoint.internal.http.api.InternalAPIDispatcher.dispatch(InternalAPIDispatcher.java:87)
at org.wso2.carbon.inbound.endpoint.protocol.http.InboundHttpServerWorker.run(InboundHttpServerWorker.java:114)
at org.wso2.carbon.inbound.endpoint.protocol.http.InboundCorrelationEnabledHttpServerWorker.run(InboundCorrelationEnabledHttpServerWorker.java:57)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:172)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager$2.run(AbstractUserStoreManager.java:175)
... 13 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy46.getAttributes(Unknown Source)
at org.wso2.micro.integrator.security.user.core.ldap.ReadOnlyLDAPUserStoreManager.getUserListOfLDAPRole(ReadOnlyLDAPUserStoreManager.java:1882)
at org.wso2.micro.integrator.security.user.core.ldap.ReadOnlyLDAPUserStoreManager.doGetUserListOfRole(ReadOnlyLDAPUserStoreManager.java:1686)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.getUserListOfRole(AbstractUserStoreManager.java:4262)
... 18 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.micro.integrator.security.user.core.ldap.LDAPConnectionContext$LdapContextInvocationHandler.invoke(LDAPConnectionContext.java:725)
... 22 more
Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: failed for MessageType : SEARCH_REQUEST
Message ID : 19
SearchRequest
baseDn : 'uid=Tom,ou=Users,dc=WSO2,dc=ORG'
filter : '(objectClass=)'
scope : base object
typesOnly : false
Size Limit : no limit
Time Limit : no limit
Deref Aliases : deref Always
attributes : 'uid'
org.apache.directory.api.ldap.model.message.SearchRequestImpl@14f69987 ManageDsaITImpl Control
Type OID : '2.16.840.1.113730.3.4.2'
Criticality : 'false'
'
: ERR_648 Invalid search base uid=Tom,ou=Users,dc=WSO2,dc=ORG]; remaining name 'uid=Tom,ou=Users,dc=WSO2,dc=ORG'
at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3183)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3104)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2895)
at java.naming/com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1330)
at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at java.naming/javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152)
... 27 more
[2025-02-07 19:18:32,295] ERROR {Utils} - Error initializing the user store. Please try again later org.wso2.micro.integrator.security.user.core.UserStoreException: Error occurred while accessing Java Security Manager Privilege Block when called by method getUserListOfRole with 1 length of Objects and argTypes [class java.lang.String]
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:193)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.getUserListOfRole(AbstractUserStoreManager.java:4182)
at org.wso2.micro.integrator.management.apis.RoleResource.handleGet(RoleResource.java:123)
at org.wso2.micro.integrator.management.apis.RoleResource.invoke(RoleResource.java:84)
at org.wso2.micro.integrator.management.apis.ApiResourceAdapter.invoke(ApiResourceAdapter.java:55)
at org.wso2.carbon.inbound.endpoint.internal.http.api.InternalAPIDispatcher.dispatch(InternalAPIDispatcher.java:87)
at org.wso2.carbon.inbound.endpoint.protocol.http.InboundHttpServerWorker.run(InboundHttpServerWorker.java:114)
at org.wso2.carbon.inbound.endpoint.protocol.http.InboundCorrelationEnabledHttpServerWorker.run(InboundCorrelationEnabledHttpServerWorker.java:57)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:172)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager$2.run(AbstractUserStoreManager.java:175)
... 13 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy46.getAttributes(Unknown Source)
at org.wso2.micro.integrator.security.user.core.ldap.ReadOnlyLDAPUserStoreManager.getUserListOfLDAPRole(ReadOnlyLDAPUserStoreManager.java:1882)
at org.wso2.micro.integrator.security.user.core.ldap.ReadOnlyLDAPUserStoreManager.doGetUserListOfRole(ReadOnlyLDAPUserStoreManager.java:1686)
at org.wso2.micro.integrator.security.user.core.common.AbstractUserStoreManager.getUserListOfRole(AbstractUserStoreManager.java:4262)
... 18 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wso2.micro.integrator.security.user.core.ldap.LDAPConnectionContext$LdapContextInvocationHandler.invoke(LDAPConnectionContext.java:725)
... 22 more
Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: failed for MessageType : SEARCH_REQUEST
Message ID : 37
SearchRequest
baseDn : 'uid=Tom,ou=Users,dc=WSO2,dc=ORG'
filter : '(objectClass=
)'
scope : base object
typesOnly : false
Size Limit : no limit
Time Limit : no limit
Deref Aliases : deref Always
attributes : 'uid'
org.apache.directory.api.ldap.model.message.SearchRequestImpl@14f7f2f9 ManageDsaITImpl Control
Type OID : '2.16.840.1.113730.3.4.2'
Criticality : 'false'
'
: ERR_648 Invalid search base uid=Tom,ou=Users,dc=WSO2,dc=ORG]; remaining name 'uid=Tom,ou=Users,dc=WSO2,dc=ORG'
at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3183)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3104)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2895)
at java.naming/com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1330)
at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
at java.naming/javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152)
... 27 more

Steps to Reproduce

  1. Configure lDAP userstore with MI server, we used IS 5.11.0 for the test purpose.
  2. Configure MI dashboard.
  3. Create a user from MI dashboard and assign a role to that user from MI dashboard
  4. Go LDAP userstore from Apache directory studio and delete only the user that you have created. You can further confirm the deletion from the MI dashboard and from the management console WSO2 IS 5.11.0.
  5. Go to MI dashboard and try to view roles it will not give any issue
  6. Now stop the MI server and -DenableCorrelationLogs=true in the micro-integrator.sh
  7. Start the MI server
  8. Go to the MI dashboard and try to view the roles. Now you will be able to see the error.

Version

4.2.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant