jira-steps-plugin icon indicating copy to clipboard operation
jira-steps-plugin copied to clipboard

Feature/token

Open reftel opened this issue 6 months ago • 13 comments

Description

See JENKINS-66449.

This change lets users pick StringCredentials in addition to UsernamePasswordCredentials in the credentials drop-down in the settings. This makes the SigningInterceptor send the secret of the credential as a bearer token, instead of using username and password for Basic Authentication. See https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html for the documentation on the Jira side.

There are automated tests in SingningInterceptorTest.

This can be tested manually by adding a Personal Access Token on a Jira instance, and add that as a String Credential in Jenkins. Then add a new site in the settings of jira-steps-plugin for that Jira instance, and choose Credentials as login type, and pick the new credential in the drop-down. Verify that a pipeline can run Jira steps using the new site.

Submitter checklist

  • [x] Link to JIRA ticket in description, if appropriate.
  • [x] Change is code complete and matches issue description.
  • [x] Appropriate unit or acceptance tests or explanation to why this change has no tests.
  • [x] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • [ ] Run the changes and verified the change matches the issue description.
  • [ ] Reviewed the code.
  • [ ] Verified that the appropriate tests have been written or valid explanation given.
  • [ ] If applicable, tested by installing this plugin on the Jenkins instance.

reftel avatar Dec 21 '23 08:12 reftel