Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-79

Solr/Sentry test filter should pass request headers

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Solr/Sentry test filter should attach the request headers to the request.

      Otherwise, the request would error out with the message:

      2013-12-30 12:13:02,081 (TEST-TestQueryOperations.testDistribSearch-seed#[4720D7F5CD503202]) [INFO - org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(HttpClientUtil.java:113)] Creating new http client, config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false
      2013-12-30 12:13:02,223 (qtp1844032651-208) [ERROR - org.apache.solr.common.SolrException.log(SolrException.java:108)] org.apache.solr.common.SolrException: Unable to locate HttpServletRequest
      	at org.apache.solr.sentry.SentryIndexAuthorizationSingleton.authorizeCollectionAction(SentryIndexAuthorizationSingleton.java:171)
      	at org.apache.solr.sentry.SentryIndexAuthorizationSingleton.authorizeAdminAction(SentryIndexAuthorizationSingleton.java:91)
      	at org.apache.solr.handler.SecureRequestHandlerUtil.checkSentry(SecureRequestHandlerUtil.java:66)
      	at org.apache.solr.handler.SecureRequestHandlerUtil.checkSentryAdmin(SecureRequestHandlerUtil.java:47)
      	at org.apache.solr.handler.admin.SecureCollectionsHandler.handleRequestBody(SecureCollectionsHandler.java:77)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      	at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:700)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:231)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      	at org.apache.sentry.tests.e2e.solr.ModifiableUserAuthenticationFilter.doFilter(ModifiableUserAuthenticationFilter.java:58)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      	at org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:134)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      	at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:301)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1077)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:368)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      	at java.lang.Thread.run(Thread.java:695)
      

        Attachments

        1. SENTRY-79.patch
          1 kB
          Vamsee K. Yarlagadda

          Activity

            People

            • Assignee:
              vamsee Vamsee K. Yarlagadda
              Reporter:
              vamsee Vamsee K. Yarlagadda
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: