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

Add support for Workspace Tokens on Bitbucket Cloud #748

Open
reuben-james opened this issue Aug 11, 2023 · 3 comments
Open

Add support for Workspace Tokens on Bitbucket Cloud #748

reuben-james opened this issue Aug 11, 2023 · 3 comments

Comments

@reuben-james
Copy link

What feature do you want to see added?

The docs say the following credential types are supported:
Scan Credentials: Credentials used to access Bitbucket API in order to discover repositories, branches and pull requests. If not set then anonymous access is used, so only public repositories, branches and pull requests are discovered and managed. HTTP Basic Authentication, Access Token and OAuth credentials are supported.

Please add support for a Workspace Token (NOT a project-specific Access Token), as described in Bitbucket docs here: https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/

Bitbucket docs describe how these can be used in-place of legacy username:password format here: https://support.atlassian.com/bitbucket-cloud/docs/using-workspace-access-tokens/

So in theory they should work in the same way that OAuth tokens do by setting jenkins:credentials:username to x-token-auth, however, this currently doesn't work.

Attempting to configure this in Jenkins for Respository Sources > Bitbucket Team/Project under an Organisational Folder does not successfully scan the bitbucket project and retrieve any repos/branches/PRs.

Upstream changes

No response

@Jonny-vb
Copy link

I can get a workspace access token to work for scanning by using a secret text credential set to the token, but that doesn't then work for checking out repos.
This could be worked around if the separate checkout credentials option was still present, but it looks like we just currently can't use workspace access tokens

@fran-pastor
Copy link

fran-pastor commented Nov 23, 2023

I can get a workspace access token to work for scanning by using a secret text credential set to the token, but that doesn't then work for checking out repos. This could be worked around if the separate checkout credentials option was still present, but it looks like we just currently can't use workspace access tokens

same behaviour for us
We can provide "Checkout over SSH" in advanced preferences but we prefer to user username/pass(or also the workspace access token) for checkout, and workspace access token for scan repos via Organisational Folder

@jbowers-celartem
Copy link

We are looking for this as well. Using user-based app passwords for build systems isn't ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants