Service Virtualization

 View Only
Expand all | Collapse all

ldap not working with registry throwing 500 internal server error

  • 1.  ldap not working with registry throwing 500 internal server error

    Posted Aug 16, 2020 08:52 PM
    trying to integrated ldap with devtest. the ldap is working fine in the setup. i see user getting authenticated at acl logs but in registry throwing 500 error:
    2020-08-16 20:31:12,781Z (08:31) [qtp2053107091-118] ERROR com.ca.ad.sv.iam.IAMClient     - IAM server returned error while obtaining access token2020-08-16 20:31:12,781Z (08:31) [qtp2053107091-118] ERROR com.ca.ad.sv.iam.IAMClient     - IAM server returned error while obtaining access tokenorg.keycloak.authorization.client.util.HttpResponseException: Unexpected response from server: 500 / Internal Server Error at org.keycloak.authorization.client.util.HttpMethod.execute(HttpMethod.java:95) at org.keycloak.authorization.client.util.HttpMethodResponse$2.execute(HttpMethodResponse.java:48) at org.keycloak.authorization.client.AuthzClient.obtainAccessToken(AuthzClient.java:133) at com.ca.ad.sv.iam.IAMClient.obtainAccessToken(IAMClient.java:204) at com.ca.ad.sv.iam.IAMClient.authenticate(IAMClient.java:121) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticateAndAuthorize(IAMAuthenticationProvider.java:119) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.usernamePasswordAuthentication(IAMAuthenticationProvider.java:99) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticate(IAMAuthenticationProvider.java:58) at com.ca.dts.security.authentication.IAMDelegatingAuthenticationProvider.doAuthentication(IAMDelegatingAuthenticationProvider.java:72) at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174) at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:822) at com.itko.lisa.test.LisaSecurityManager.authenticateUser(LisaSecurityManager.java:960) at com.itko.lisa.invoke.resource.AclResource.authenticateAndAuthorize(AclResource.java:321) at sun.reflect.GeneratedMethodAccessor6835.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at com.itko.lisa.invoke.AuthenFilter.doFilter(AuthenFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at com.itko.lisa.coordinator.XSSFilter.doFilter(XSSFilter.java:32) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:524) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:748)2020-08-16 20:31:12,781Z (08:31) [qtp2053107091-118] ERROR com.itko.lisa.test.LisaSecurityManager - Authentication Errororg.springframework.security.authentication.AuthenticationServiceException: org.keycloak.authorization.client.util.HttpResponseException: Unexpected response from server: 500 / Internal Server Error at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticateAndAuthorize(IAMAuthenticationProvider.java:186) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.usernamePasswordAuthentication(IAMAuthenticationProvider.java:99) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticate(IAMAuthenticationProvider.java:58) at com.ca.dts.security.authentication.IAMDelegatingAuthenticationProvider.doAuthentication(IAMDelegatingAuthenticationProvider.java:72) at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174) at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:822) at com.itko.lisa.test.LisaSecurityManager.authenticateUser(LisaSecurityManager.java:960) at com.itko.lisa.invoke.resource.AclResource.authenticateAndAuthorize(AclResource.java:321) at sun.reflect.GeneratedMethodAccessor6835.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at com.itko.lisa.invoke.AuthenFilter.doFilter(AuthenFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at com.itko.lisa.coordinator.XSSFilter.doFilter(XSSFilter.java:32) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:524) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:748)2020-08-16 20:31:12,781Z (08:31) [qtp2053107091-118] ERROR com.itko.lisa.invoke.resource.AclResource - Error occurred while authenticating user with Registrycom.itko.lisa.acl.AuthenticationException: Authentication Error at com.itko.lisa.test.LisaSecurityManager.authenticateUser(LisaSecurityManager.java:964) at com.itko.lisa.invoke.resource.AclResource.authenticateAndAuthorize(AclResource.java:321) at sun.reflect.GeneratedMethodAccessor6835.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at com.itko.lisa.invoke.AuthenFilter.doFilter(AuthenFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at com.itko.lisa.coordinator.XSSFilter.doFilter(XSSFilter.java:32) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:524) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:748)Caused by: org.springframework.security.authentication.AuthenticationServiceException: org.keycloak.authorization.client.util.HttpResponseException: Unexpected response from server: 500 / Internal Server Error at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticateAndAuthorize(IAMAuthenticationProvider.java:186) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.usernamePasswordAuthentication(IAMAuthenticationProvider.java:99) at com.ca.dts.security.authentication.internal.IAMAuthenticationProvider.authenticate(IAMAuthenticationProvider.java:58) at com.ca.dts.security.authentication.IAMDelegatingAuthenticationProvider.doAuthentication(IAMDelegatingAuthenticationProvider.java:72) at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174) at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:822) at com.itko.lisa.test.LisaSecurityManager.authenticateUser(LisaSecurityManager.java:960) ... 54 more


  • 2.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 01:57 AM
    Hi Nikhil,

    Which version of DevTest are you using?

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 3.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 02:06 AM
    hi vaibhav,

    we are using 10.6.0 version

    regards,
    Nikhil Singh


  • 4.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 02:18 AM
    Also, are you able to access the portal?

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 5.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 02:30 AM
    yes vaibhav  all service are running fine when i use admin user/password it works perfectly issue only with ldap users.


  • 6.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 06:58 AM
    Hi Nikhil,

    When you login as admin, Are you able to see/search the LDAP users?

    Also, make sure username is assigned with attribute where userids are stored as per their LDAP schema i.e. (could be cn or other)

    Thanks



    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 7.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 01:06 PM
    Hi vaibhav,

    as per my knowledge we can't search user until we do a successful login, is there any other way to search user?
    the username assigned seems to be fine as i get proper logs for incorrect username.and i have verified the values.

    regards,
    Nikhil Singh



  • 8.  RE: ldap not working with registry throwing 500 internal server error
    Best Answer

    Posted Aug 17, 2020 01:22 PM
    Hi Nitin,

    Refer to below link for similar issue:

    https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=0df02015-1085-413d-84b9-9707338fe7ae&CommunityKey=94bda077-625b-4914-8ac3-c88a06c2cc23&tab=digestviewer#bm0df02015-1085-413d-84b9-9707338fe7ae

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 9.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 03:58 PM
    yes this helped the issue was due to incorrect attribute mapping and the only way to figure it out is by using server.log file .


  • 10.  RE: ldap not working with registry throwing 500 internal server error

    Posted Aug 17, 2020 04:09 PM
    Thanks for the update.

    Attribute Mapping is only visible in logs.

    Good to know its fixed

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------