Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23208

Backtrace when trying to use 'remember me' with latest crowd auth plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • crowd2-plugin
    • None

      Get this reliably if I choose "remember me" after upgrading to latest crowd2 auth plugin:

      java.lang.IllegalArgumentException: Object of class [java.lang.String] must be an instance of interface org.acegisecurity.userdetails.UserDetails
      at org.springframework.util.Assert.isInstanceOf(Assert.java:337)
      at org.springframework.util.Assert.isInstanceOf(Assert.java:319)
      at hudson.security.TokenBasedRememberMeServices2.loginSuccess(TokenBasedRememberMeServices2.java:105)
      at org.acegisecurity.ui.AbstractProcessingFilter.successfulAuthentication(AbstractProcessingFilter.java:488)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:266)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      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:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)

          [JENKINS-23208] Backtrace when trying to use 'remember me' with latest crowd auth plugin

          Nathan Neulinger created issue -

          This also seems to do something to the state/cookies as well, which causes you to have to log in TWICE without the checkbox checked in order for the auth to work.

          Nathan Neulinger added a comment - This also seems to do something to the state/cookies as well, which causes you to have to log in TWICE without the checkbox checked in order for the auth to work.

          1) Initial plugin author implemented SSO using rememberme.
          2) See this JENKINS-17060

          Kanstantsin Shautsou added a comment - 1) Initial plugin author implemented SSO using rememberme. 2) See this JENKINS-17060
          Kanstantsin Shautsou made changes -
          Link New: This issue depends on JENKINS-17060 [ JENKINS-17060 ]

          I have the same problem - Jenkins 1.572 Crowd 2 plugin

          someone will fix this?

          Mark Lübbehüsen added a comment - I have the same problem - Jenkins 1.572 Crowd 2 plugin someone will fix this?

          Have you tried to disable "remember me" button in security configuration?

          Kanstantsin Shautsou added a comment - Have you tried to disable "remember me" button in security configuration?

          i dont want to disable it. i want to use this remember me function. no ideas?

          Mark Lübbehüsen added a comment - i dont want to disable it. i want to use this remember me function. no ideas?

          Try disable this button. SSO should work.

          Kanstantsin Shautsou added a comment - Try disable this button. SSO should work.

          Kanstantsin Shautsou added a comment - And please try this https://jenkins.ci.cloudbees.com/job/plugins/job/crowd2-plugin/17/org.jenkins-ci.plugins$crowd2/artifact/org.jenkins-ci.plugins/crowd2/1.8-SNAPSHOT/crowd2-1.8-SNAPSHOT.hpi i added fast patch but have no time to check it...

          Added one more fix, please test this https://jenkins.ci.cloudbees.com/job/plugins/job/crowd2-plugin/20/org.jenkins-ci.plugins$crowd2/ hpi build and reply wether you use sso and what jenkins version you have. If everything ok i will release new version.

          Kanstantsin Shautsou added a comment - Added one more fix, please test this https://jenkins.ci.cloudbees.com/job/plugins/job/crowd2-plugin/20/org.jenkins-ci.plugins$crowd2/ hpi build and reply wether you use sso and what jenkins version you have. If everything ok i will release new version.

            dumam Bartosz Nowak
            nneul Nathan Neulinger
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: