Plugins should allow passing actual token value as instead of a credential id

XMLWordPrintable

      I seems the plugin only works with Jenkins credentials, not actual token

      The following does not work:

      node ("a_node") {
          stage("Test") {
              withVault(vaultSecrets: [
                  [
                      path: "mysecret.usertoken", secretValues: [
                          [vaultKey: "username", envVar: "USERNAME"],
                          [vaultKey: "token", envVar: "TOKEN"],
                      ]
                  ]
              ]) {
      
                  def remoteRes = triggerRemoteJob(
                      job: "https://my-jenkins.ahost.internal/job/test/",
                      auth: TokenAuth(apiToken: env.TOKEN, userName: env.USERNAME),
                      blockBuildUntilComplete: true)
                  echo "remoteRes: $remoteRes"
              }
          }
      } 

      We have a large number of Jenkins instances, all configured with code.

      It is not feasible for us to add specialized secrets as jenkins credentials, they are handled in Hashicorp Vault by users of the individual Jenkins instances. These users are not admins.

      Please add support to pass the actual token instead of a credential id.

            Assignee:
            KaiHsiang Chang
            Reporter:
            Lars Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: