Project

General

Profile

Actions

Bug #11936

open

Task #11847: APIM 420 related bugs and improvements

Cannot assign/update role permission

Added by Arshana Atapattu 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Critical
Start date:
12/09/2024
Due date:
% Done:

0%

Estimated time:
Device Type:
Component:
Type:
Platform

Description

Environment details
6.2.0 pack(with apim 420 changes)

Prerequisites
none

Steps
create a role and add permissions
Note: for one role added all permissions and for another one added less than 10 permissions.

Description
After a role creation it asks for assigning permissions for a role. when assigning roles and update the permissions it shows the action is success.
but at a later point in the carbon console it shows a error(permissions are not updated)

carbon log error: [1]

Result

[1]
[2024-09-12 11:04:04,129] ERROR {io.entgra.device.mgt.core.apimgt.extension.rest.api.PublisherRESTAPIServicesImpl} - Error occurred while processing the response
java.io.IOException: unexpected end of stream on https://localhost:9443/...
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:210) ~[?:?]
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110) ~[?:?]
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93) ~[?:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) ~[?:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[?:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[?:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[?:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[?:?]
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[?:?]
at io.entgra.device.mgt.core.apimgt.extension.rest.api.PublisherRESTAPIServicesImpl.updateSharedScope(PublisherRESTAPIServicesImpl.java:223) ~[?:?]
at io.entgra.device.mgt.core.apimgt.extension.rest.api.PublisherRESTAPIServicesImpl.updateSharedScope(PublisherRESTAPIServicesImpl.java:232) ~[?:?]
at io.entgra.device.mgt.core.apimgt.webapp.publisher.APIPublisherServiceImpl.updateScopes(APIPublisherServiceImpl.java:756) ~[?:?]
at io.entgra.device.mgt.core.apimgt.webapp.publisher.APIPublisherServiceImpl.updateScopeRoleMapping(APIPublisherServiceImpl.java:672) ~[?:?]
at io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.impl.RoleManagementServiceImpl$1.run(RoleManagementServiceImpl.java:833) ~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335) ~[?:?]
at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29) ~[?:?]
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180) ~[?:?]
... 19 more
[2024-09-12 11:04:04,124] WARN - CarbonStuckThreadDetectionValve Thread [https-jsse-nio-9443-exec-34] (id=[{6}]) has been active for [600,052] milliseconds (since [9/12/24, 10:54 AM]) to serve the same request for [https://localhost:9443/api/am/publisher/v4/scopes/1f2b1f9a-e5d5-4bb4-998b-9ef292479bfa] and may be stuck (configured threshold for this StuckThreadDetectionValve is [600] seconds). There is/are [13] thread(s) in total that are monitored by this Valve and may be stuck., tenantDomain=carbon.super, correlation-id=d8aee208-79f7-4b2e-a49f-335c1db16c0c
java.lang.Throwable: null
at jdk.internal.misc.Unsafe.park(Native Method) ~[?:?]
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:194) ~[?:?]
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) ~[?:?]
at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:391) ~[httpcore_4.4.16.wso2v1.jar:?]
at org.apache.http.pool.AbstractConnPool.access$300(AbstractConnPool.java:70) ~[httpcore_4.4.16.wso2v1.jar:?]
at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:253) ~[httpcore_4.4.16.wso2v1.jar:?]
at org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:198) ~[httpcore_4.4.16.wso2v1.jar:?]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:306) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:282) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient_4.5.13.wso2v1.jar:?]
at org.wso2.carbon.apimgt.impl.kmclient.ApacheFeignHttpClient.execute_aroundBody0(ApacheFeignHttpClient.java:83) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.impl.kmclient.ApacheFeignHttpClient.execute(ApacheFeignHttpClient.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:121) ~[io.github.openfeign.feign-core_11.9.1.jar:?]
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91) ~[io.github.openfeign.feign-core_11.9.1.jar:?]
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[io.github.openfeign.feign-core_11.9.1.jar:?]
at com.sun.proxy.$Proxy1121.updateScope(Unknown Source) ~[?:?]
at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.updateScope_aroundBody62(AMDefaultKeyManagerImpl.java:1060) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.updateScope(AMDefaultKeyManagerImpl.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateSharedScope_aroundBody366(APIProviderImpl.java:4788) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateSharedScope(APIProviderImpl.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.updateSharedScope(UserAwareAPIProvider.java:1) ~[org.wso2.carbon.apimgt.impl_9.28.116.156.jar:?]
at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ScopesApiServiceImpl.updateSharedScope(ScopesApiServiceImpl.java:242) ~[?:?]
at org.wso2.carbon.apimgt.rest.api.publisher.v1.ScopesApi.updateSharedScope(ScopesApi.java:140) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor651.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[?:?]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[?:?]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) ~[?:?]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[?:?]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) ~[?:?]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[?:?]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[?:?]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[?:?]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304) ~[?:?]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:234) ~[?:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:558) ~[tomcat-servlet-api_9.0.85.wso2v1.jar:?]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279) ~[?:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:119) ~[org.wso2.carbon.identity.context.rewrite.valve_1.7.1.jar:?]
at org.wso2.carbon.identity.context.rewrite.valve.OrganizationContextRewriteValve.invoke(OrganizationContextRewriteValve.java:116) ~[org.wso2.carbon.identity.context.rewrite.valve_1.7.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.SameSiteCookieValve.invoke(SameSiteCookieValve.java:38) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:165) ~[org.wso2.carbon.identity.authz.valve_1.7.1.jar:?]
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:118) ~[org.wso2.carbon.identity.auth.valve_1.7.1.2.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:106) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at io.entgra.device.mgt.core.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:86) ~[io.entgra.device.mgt.core.webapp.authenticator.framework_5.2.4.SNAPSHOT.jar:?]
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:67) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:152) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:670) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:63) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:137) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat_9.0.85.wso2v1.jar:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
[2024-09-12 11:04:04,125] ERROR - GlobalThrowableMapper An unknown exception has been captured by the global exception mapper.
java.lang.ThreadDeath: null
at java.lang.Thread.stop(Thread.java:937) ~[?:?]
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.handleStuckThread(CarbonStuckThreadDetectionValve.java:118) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.backgroundProcess(CarbonStuckThreadDetectionValve.java:171) ~[org.wso2.carbon.tomcat.ext_4.8.1.jar:?]
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1092) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1301) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1305) ~[tomcat_9.0.85.wso2v1.jar:?]
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1283) ~[tomcat_9.0.85.wso2v1.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat_9.0.85.wso2v1.jar:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
[2024-09-12 11:04:04,129] ERROR - APIPublisherServiceImpl Error occurred while updating role scope mapping via APIM REST endpoint.
io.entgra.device.mgt.core.apimgt.extension.rest.api.exceptions.APIServicesException: Error occurred while processing the response
at io.entgra.device.mgt.core.apimgt.extension.rest.api.PublisherRESTAPIServicesImpl.updateSharedScope(PublisherRESTAPIServicesImpl.java:245) ~[io.entgra.device.mgt.core.apimgt.extension.rest.api_5.2.4.SNAPSHOT.jar:?]
at io.entgra.device.mgt.core.apimgt.extension.rest.api.PublisherRESTAPIServicesImpl.updateSharedScope(PublisherRESTAPIServicesImpl.java:232) ~[io.entgra.device.mgt.core.apimgt.extension.rest.api_5.2.4.SNAPSHOT.jar:?]
at io.entgra.device.mgt.core.apimgt.webapp.publisher.APIPublisherServiceImpl.updateScopes(APIPublisherServiceImpl.java:756) ~[io.entgra.device.mgt.core.apimgt.webapp.publisher_5.2.4.SNAPSHOT.jar:?]
at io.entgra.device.mgt.core.apimgt.webapp.publisher.APIPublisherServiceImpl.updateScopeRoleMapping(APIPublisherServiceImpl.java:672) ~[io.entgra.device.mgt.core.apimgt.webapp.publisher_5.2.4.SNAPSHOT.jar:?]
at io.entgra.device.mgt.core.device.mgt.api.jaxrs.service.impl.RoleManagementServiceImpl$1.run(RoleManagementServiceImpl.java:833) ~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
[2024-09-12 11:04:04,178] ERROR - OAuthOpaqueAuthenticatorImpl Invalid OAuth Token : Invalid Access Token. ACTIVE access token is not found.
[2024-09-12 11:04:04,178] ERROR - OAuthOpaqueAuthenticatorImpl Provided access token is invalid
[2024-09-12 11:04:04,246] ERROR - OAuthOpaqueAuthenticatorImpl Provided access token is invalid

Actions

Also available in: Atom PDF