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

UsernamePasswordAuthenticationToken cannot be cast to AssemblaAuthenticationToken

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: assembla-auth, core
    • Environment:
      Jenkins 2.5 (installed via apt-get upgrade), master only
      Also: Jenkins 2.7 (installed via apt-get install)

      Assembla Auth Plugin 1.06
      Credentials Plugin 1.27

      Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-74-generic x86_64)
    • Similar Issues:

      Description

      Jenkins Authorization is integrated with Assembla's auth. Security Realm uses Assembla Auth Plugin.

      Jobs finish with FAILURE status with the following error message (always the last item in the console log) :

      FATAL: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to com.assembla.jenkinsci.plugin.AssemblaAuthenticationToken
      java.lang.ClassCastException: org.acegisecurity.providers.UsernamePasswordAuthenticationToken cannot be cast to com.assembla.jenkinsci.plugin.AssemblaAuthenticationToken
      	at com.assembla.jenkinsci.plugin.AssemblaSecurityRealm.loadUserByUsername(AssemblaSecurityRealm.java:333)
      	at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1050)
      	at hudson.model.User.get(User.java:395)
      	at hudson.model.User.get(User.java:364)
      	at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:374)
      	at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:435)
      	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:350)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
      	at hudson.model.Run.execute(Run.java:1766)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Finished: FAILURE
      

      This behaviour didn't occur in the previous Jenkins version 1.6.x

        Attachments

          Activity

          Hide
          jakub Jakub Czaplicki added a comment -

          Still occurs in ver.2.6

          Show
          jakub Jakub Czaplicki added a comment - Still occurs in ver.2.6
          Hide
          jakub Jakub Czaplicki added a comment -

          Frédéric, I've assigned this ticket to you since your name was on the last assembla-auth ticket.

          Show
          jakub Jakub Czaplicki added a comment - Frédéric, I've assigned this ticket to you since your name was on the last assembla-auth ticket.
          Hide
          jakub Jakub Czaplicki added a comment -

          Reported the problem via https://helpdesk.assembla.com/customer/portal/emails/new on 2016-06-01

          Contacted the Assembla Open Source team via email on 2016-06-02 (contact details: https://www.assembla.com/spaces/assembla-oss/team )

          Link to src code: https://www.assembla.com/spaces/assembla-oss/git/source

          Show
          jakub Jakub Czaplicki added a comment - Reported the problem via https://helpdesk.assembla.com/customer/portal/emails/new on 2016-06-01 Contacted the Assembla Open Source team via email on 2016-06-02 (contact details: https://www.assembla.com/spaces/assembla-oss/team ) Link to src code: https://www.assembla.com/spaces/assembla-oss/git/source
          Hide
          fcamblor Frédéric Camblor added a comment -

          Hi, I'm not the assembla maintainer.
          I was involved into JENKINS-19189 more because of scm-sync-configuration plugin than for assembla

          Show
          fcamblor Frédéric Camblor added a comment - Hi, I'm not the assembla maintainer. I was involved into JENKINS-19189 more because of scm-sync-configuration plugin than for assembla
          Hide
          jakub Jakub Czaplicki added a comment -

          That's what I suspected. I've reported the issue to Assembla (they maintain the plugin). They now have created an internal ticket to look into this issue.

          Show
          jakub Jakub Czaplicki added a comment - That's what I suspected. I've reported the issue to Assembla (they maintain the plugin). They now have created an internal ticket to look into this issue.
          Hide
          paveld Pavel Dotsulenko added a comment -

          Hi Jakub Czaplicki, thanks for reporting the issue, new release with a bugfix has been pushed to jenkins repository. New plugin version will be available in the update center in about 8 hours.

          Also, you can download it here and install manually: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/assembla-auth/1.09/assembla-auth-1.09.hpi

          Show
          paveld Pavel Dotsulenko added a comment - Hi Jakub Czaplicki , thanks for reporting the issue, new release with a bugfix has been pushed to jenkins repository. New plugin version will be available in the update center in about 8 hours. Also, you can download it here and install manually: http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/assembla-auth/1.09/assembla-auth-1.09.hpi
          Hide
          jakub Jakub Czaplicki added a comment -

          Hi Pavel Dotsulenko, Many thanks for quick fix! I'll install it as soon as it's available.

          Earlier today I updated two other plugins that had a fresh new versions:

          At the same time I installed https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin I wanted to use it as a workaround.

          Now. It seems that one of the updates.. fixed the problem. The changelog in the Pipeline Multibranch Plugin says "Internal refactoring to expose multibranch functionality to other plugins" - perhaps this is what was causing the problem in the first place ?

          Anyhow, I am glad you've got a fix for this on your side.

          Show
          jakub Jakub Czaplicki added a comment - Hi Pavel Dotsulenko , Many thanks for quick fix! I'll install it as soon as it's available. Earlier today I updated two other plugins that had a fresh new versions: https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Multibranch+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Branch+API+Plugin At the same time I installed https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin I wanted to use it as a workaround. Now. It seems that one of the updates.. fixed the problem. The changelog in the Pipeline Multibranch Plugin says "Internal refactoring to expose multibranch functionality to other plugins" - perhaps this is what was causing the problem in the first place ? Anyhow, I am glad you've got a fix for this on your side.
          Hide
          jakub Jakub Czaplicki added a comment -

          Updated the plugin to ver.1.09, rerun my Jenkins jobs a couple of times. All works as expected.
          The issue indeed has been fixed.

          I've updated https://wiki.jenkins-ci.org/display/JENKINS/Assembla+Auth+Plugin with the ver.no.

          Show
          jakub Jakub Czaplicki added a comment - Updated the plugin to ver.1.09, rerun my Jenkins jobs a couple of times. All works as expected. The issue indeed has been fixed. I've updated https://wiki.jenkins-ci.org/display/JENKINS/Assembla+Auth+Plugin with the ver.no.

            People

            • Assignee:
              paveld Pavel Dotsulenko
              Reporter:
              jakub Jakub Czaplicki
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: