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

Support for Bearer token in jenkins-cli

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: cli
    • Labels:
      None
    • Similar Issues:

      Description

      I would like to use the built-in jenkins-cli for our automation towards Jenkins.

      However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

      I.e. we would like to do something as the following ("oc" is the Openshift client):

      oc login https://ose-console.cluster
      TOKEN=$(oc whoami -t)
      JENKINS_URL=https://jenkins.in.ose.cluster java -jar jenkins-cli.jar -auth $TOKEN help build
      

        Attachments

          Activity

          sorend Soren A D created issue -
          sorend Soren A D made changes -
          Field Original Value New Value
          Description I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login.

           
          I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

           
          sorend Soren A D made changes -
          Description I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

           
          I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

           

          E.g. we would like to do something as the following ("oc" is the Openshift client):

           
          {noformat}
          oc login https://ose-console.cluster
          TOKEN=$(oc whoami -t)
          JENKINS_URL=https://jenkins.in.ose.cluster java -jar jenkins-cli.jar -auth $TOKEN help build
          {noformat}
           

           
          sorend Soren A D made changes -
          Description I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

           

          E.g. we would like to do something as the following ("oc" is the Openshift client):

           
          {noformat}
          oc login https://ose-console.cluster
          TOKEN=$(oc whoami -t)
          JENKINS_URL=https://jenkins.in.ose.cluster java -jar jenkins-cli.jar -auth $TOKEN help build
          {noformat}
           

           
          I would like to use the built-in jenkins-cli for our automation towards Jenkins.

          However, we are using the Openshift OAuth login integration. For this to work, we need to use the Openshift token as Bearer to be able to login, but jenkins-cli always creates Basic value in the auth header.

          I.e. we would like to do something as the following ("oc" is the Openshift client):
          {noformat}
          oc login https://ose-console.cluster
          TOKEN=$(oc whoami -t)
          JENKINS_URL=https://jenkins.in.ose.cluster java -jar jenkins-cli.jar -auth $TOKEN help build
          {noformat}

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sorend Soren A D
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: