mps-code-reviewer icon indicating copy to clipboard operation
mps-code-reviewer copied to clipboard

Unable to use mps code reviewer with bitbucket cloud

Open bkolb opened this issue 6 years ago • 4 comments

Bitbucket cloud does not support personal access tokens. Instead one has to create either an app password or an oAuth key. The plugin should be able to deal with either of those.

See https://developer.atlassian.com/cloud/bitbucket/authentication-for-apps/

bkolb avatar Apr 23 '18 11:04 bkolb

We also need to be wary of API differences between Bitbucket Cloud and Bitbucket Server. We should make separate configurations for each since we'll need to hit different endpoints (and API versions) for the same actions, and possibly hide certain functionality if it's not available.

Here's another page on OAuth2 tokens for Bitbucket Cloud: https://developer.atlassian.com/cloud/bitbucket/oauth-2/

justinhorton avatar Apr 23 '18 12:04 justinhorton

I agree - and I would expect a new configuration for each of the different offerings (Bitbucket Server, Bitbucket Cloud, and vanilla Bitbucket) as they do/can have some substantial differences. Non-Bitbucket offerings would be the same - different configurations.

ty1824 avatar Apr 23 '18 15:04 ty1824

Here's the doc on creating an application password: https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html

This is how to make a request with that password (Basic auth):

curl --user userName:appPassword https://api.bitbucket.org/1.0/user/repositories

I'm unsure if we want to support this flow, or OAuth2.

justinhorton avatar May 04 '18 13:05 justinhorton

As App Passwords work effectively the same way as Personal Access Tokens, I would prefer this approach over OAuth2, initially.

ty1824 avatar May 07 '18 21:05 ty1824