-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/token #187
base: master
Are you sure you want to change the base?
Feature/token #187
Conversation
The code was already correct, but Spotbugs did not know that the methods called were pure, and therefore thoought they might return null when called a second time. This change enables Spotbugs to reason correctly about the code.
Earlier, the settings page on Jenkins would crash if there were no other plugins that pulled in okhttp3.
Makes changes to add new types of credentials less invasive, thus easier to review.
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.
Ping @nrayapati |
1 similar comment
Ping @nrayapati |
@nrayapati can you please review? |
@nrayapati @nfalco79 Can you review this PR? This is a very useful feature. |
i'm already using code from this PR for some time, and eveything works fine for me - is there any chance to see it merged into master? |
I'm not the mantainer, so my code review is useless to proceed with merge |
This is critically needed, my org has forced a move to disabling basic auth, and oauth is not supported, so this would be the only way to continue using this plugin. |
I'm in the same situation, had to locally build code from the fork and upload it manually... Anyway seems like this plugin is abandoned :-( @nrayapati |
@reftel After upgrading Jenkins to latest LTS - i've started getting |
Looks to me like the only place where that method is called is when setting up proxy authentication. You should be able to get that exception if you have |
Thank you for quick response. We use/need proxy + port + no_proxy settings, but we're not using username & password. Alas, i cannot delete all proxy settings, since we need it. In Jenkins changelog i've found this change, which might be related to the problem: https://github.com/jenkinsci/jenkins/pull/8990/files Anyway once i've removed on our test server all proxy settings, it started working... but proxy settings are needed for other urls. |
So the problem is not in your PR, it's for another PR... Change in screenshot above fixed the issue for me. So it was really caused by this jenkins change: https://github.com/jenkinsci/jenkins/pull/8990 |
Fixed in 8c4a487 . Thank you! |
Description
See JENKINS-66449.
This change lets users pick
StringCredentials
in addition toUsernamePasswordCredentials
in the credentials drop-down in the settings. This makes theSigningInterceptor
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
Reviewer checklist