I am trying to use Bitbucket trigger pipeline . I have setup 2 factor authentication for my Bitbucket account. We need to provide username and password for the pipe to work. Looking at the source of the pipe if is using basic authentication.
Basic HTTP Authentication as per RFC-2617 (Digest not supported). Note that Basic Auth with username and password as credentials is only available on accounts that have 2-factor-auth / 2-step-verification disabled. If you use 2fa, you should authenticate using OAuth2 instead.
Ref: https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication
Will this pipe work for account which have 2 factor authentication. If not can this pipe be enhanced?
@t1279k thanks for the question,
Our pipe is based on bitbucket api.
Bitbucket api have several methods to authenticate.
For now, you can setup app password and give it least granular permissions that are needed to execute (running pipeline permission, access to repositories for example etc.).
This is explained in the last section in the doc you mentioned.
The second way is to setup OAuth consumer which is also explained there. But this way is not supported right now in our pipe, BUT supported via Bitbucket Api. We will think about this update and discuss, it seems handy , useful and important change.
If you have setup 2factor for account, app password that we use still should work. E.g., it works for my account.I quote the sentence in doc mentioned:
Some important points about app passwords:
You cannot use them to log into your Bitbucket account.
You can use them for API call authentication, even if you don't have two-step verification enabled.
Please, give us the feedback if it does not.
I guess, that basic auth there is mentioned in the way you cannot use your password to authenticate, but instead you still can create app passwords that are different from your password
However, we will also discuss the change to support Oauth consumers, it is nice suggestion, thanks.
Regards, Galyna
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.