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

Getting "java.lang.String cannot be cast to java.util.List" after upgrading to saml-plugin 2.0.0

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • saml-plugin
    • OS: Amazon Linux release 2 (Karoo)
      Jenkins version: 2.282
      saml-plugin version: 2.0.0
    • saml-2.0.3

      After upgrading to 2.0.0, when users are redirected back to `/securityRealm/finishLogin ` the following exception is thrown:

      WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://jenkins.domain/securityRealm/finishLogin 
      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List 
              at org.jenkinsci.plugins.saml.SamlSecurityRealm.modifyUserFullName(SamlSecurityRealm.java:453) 
              at org.jenkinsci.plugins.saml.SamlSecurityRealm.doFinishLogin(SamlSecurityRealm.java:335) 
              at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) 
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) 
      Caused: java.lang.reflect.InvocationTargetException 
      

      However if you continue into Jenkins, the user is authenticated and can browse freely. It will happen every time a user needs to be re-authenticated.

       

       

          [JENKINS-65093] Getting "java.lang.String cannot be cast to java.util.List" after upgrading to saml-plugin 2.0.0

          Drew created issue -
          Ivan Fernandez Calvo made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 26557 ]
          Ivan Fernandez Calvo made changes -
          Released As New: saml-2.0.1
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Drew made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Ivan Fernandez Calvo made changes -
          Status Original: Reopened [ 4 ] New: In Progress [ 3 ]
          Ivan Fernandez Calvo made changes -
          Remote Link New: This issue links to "PR_2 (Web Link)" [ 26568 ]
          Ivan Fernandez Calvo made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Ivan Fernandez Calvo made changes -
          Released As Original: saml-2.0.1 New: saml-2.0.3
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Drew made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

            ifernandezcalvo Ivan Fernandez Calvo
            drewrogers Drew
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: