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

User logged out after successful configuration of "Run as Specific User" (as of Jenkins 2.150.2)

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.210

      Description

      Actual behaviour

      As user "A" when configuring authorization
      using the "Run as Specific User" strategy to run a job as user "B"
      after successful authentication with the password of user "B"
      user "A" is logged out.

      Expected behaviour

      User "A" is still logged in.

      Root Cause Analysis

      This issue is present starting with Jenkins 2.150.2 which implemented new security measures for user sessions (see changelog https://jenkins.io/changelog-stable/#v2.150.2). It seems that the below call from here invalidates the current user session:

      Jenkins.getActiveInstance().getSecurityRealm().getSecurityComponents().manager.authenticate(
          new UsernamePasswordAuthenticationToken(userId, password)
      );
      

        Attachments

          Activity

          renescheibe René Scheibe created issue -
          ikedam ikedam made changes -
          Field Original Value New Value
          Component/s core [ 15593 ]
          Assignee Wadeck Follonier [ wfollonier ]
          jvz Matt Sicker made changes -
          Assignee Wadeck Follonier [ wfollonier ] Matt Sicker [ jvz ]
          jvz Matt Sicker made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jvz Matt Sicker made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          oleg_nenashev Oleg Nenashev made changes -
          Released As Jenkins 2.210
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]
          oleg_nenashev Oleg Nenashev made changes -
          Labels lts-candidate
          olivergondza Oliver Gondža made changes -
          Labels lts-candidate 2.204.2-fixed

            People

            Assignee:
            jvz Matt Sicker
            Reporter:
            renescheibe René Scheibe
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: