Skip to content
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

[JENKINS-70897] Add support for personal access token authentication #1104

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Gagarmel
Copy link

@Gagarmel Gagarmel commented Feb 8, 2024

JENKINS-70897 - Add support for personal access token authentication

On Bitbucket Datacenter/Cloud and Azure it is required to use personal access tokens instead of username/password authentication.

Resolves jenkinsci/bitbucket-branch-source-plugin#716

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • Infrastructure change (non-breaking change which updates dependencies or improves infrastructure)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@Gagarmel Gagarmel requested a review from a team as a code owner February 8, 2024 20:25
@github-actions github-actions bot added the dependencies Dependency related change label Feb 8, 2024
@Gagarmel Gagarmel changed the title Add support for personal access token authentication [JENKINS-70897] Add support for personal access token authentication Feb 9, 2024
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the pull request.

Can you describe the testing that you performed to confirm that the change works as expected?

@Gagarmel
Copy link
Author

I've tested the changes by creating an organizational folder for project auto discovery. The token added in there as credentials discovers all projects/branches as expected, but the builds weren't able to checkout the repository. Tested it with a Windows build agent and Kubernetes cloud agents.

I'm also working on a PR in the git-plugin to pass the credentials in here. Otherwise this change will not work at all.

@Gagarmel Gagarmel marked this pull request as draft February 13, 2024 19:38
@Gagarmel Gagarmel marked this pull request as ready for review March 21, 2024 19:00
@MarkEWaite MarkEWaite added enhancement Improvement or new feature and removed dependencies Dependency related change labels Apr 9, 2024
Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need a corrsponding change for jgit, or is this unsupported there?
if unsupported should this not be called somewhere?

@MarkEWaite
Copy link
Contributor

does this need a corrsponding change for jgit, or is this unsupported there? if unsupported should this not be called somewhere?

I think that there is an alternate implementation technique that would add support for a standard credential and would work with both JGit and command line git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for HTTP access token
3 participants