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

Improve API Token "API" capability, esp. for scripting

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      The idea is to provide ways for a script to create more easily API Tokens, revoke them. Also, to provide a default API Token for the admin user.

      We need to have such capability for Jenkins X in order to reduce the dependence on the crumb issuer and thus, reduce the code complexity around the authentication they are required to use.

        Attachments

          Activity

          Hide
          blastik blastik . added a comment -

          as requested in https://github.com/jenkinsci/jenkins/pull/4027#issuecomment-534558658

           
          I'm deploying a new Jenkins from scratch on a single host using Docker all on top of AWS. Its authentication mode is set to SAML (using Okta) and we configure it using JCasC (Configuration as code). The deployment strategy we decided is to deploy a new instance each time a configuration change is made. However, in order to give a good experience to our end users, we want to make 2 steps before swapping between old and new release:

          1. Put the old instance in Quiet mode.
          2. Query running builds
          3. When running query builds = 0 then swap the instance. We have no problem on doing that with the API but... the problem is that we depend on one single thing: the API token!

          Ideally we would like to add a fix token into JCasC file to be able to connect to the API once Jenkins the host has been configured.
          jenkins saml

          Show
          blastik blastik . added a comment - as requested in https://github.com/jenkinsci/jenkins/pull/4027#issuecomment-534558658   I'm deploying a new Jenkins from scratch on a single host using Docker all on top of AWS. Its authentication mode is set to SAML (using Okta) and we configure it using JCasC (Configuration as code). The deployment strategy we decided is to deploy a new instance each time a configuration change is made. However, in order to give a good experience to our end users, we want to make 2 steps before swapping between old and new release: Put the old instance in Quiet mode. Query running builds When running query builds = 0 then swap the instance. We have no problem on doing that with the API but... the problem is that we depend on one single thing: the API token! Ideally we would like to add a fix token into JCasC file to be able to connect to the API once Jenkins the host has been configured. jenkins   saml

            People

            Assignee:
            wfollonier Wadeck Follonier
            Reporter:
            wfollonier Wadeck Follonier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: