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

Address comments in #28 #43

Merged
merged 3 commits into from
Dec 17, 2024
Merged

Address comments in #28 #43

merged 3 commits into from
Dec 17, 2024

Conversation

bwieger-atlassian-com
Copy link
Collaborator

  • VSCODE-1050: PAT auth for hosted BitBucket(like for hosted Jira)

Like the API of Jira and Bitbucket, the API of Bitbucket supports Bearer Auth using PAT instead of Basic Auth:
https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

A number of other customers have expressed a need for this feature, not just us (Cloud Software Group): We disallow the use of HTTP Basic Auth for security reasons for the Confluence, Jira and Bitbucket APIs of our self-hosted services. Instead, we require the use of Bearer Auth using a PAT by the users.

A background information for this is that, that your security policy requires 2FA or alternatively tokens, password authentication without a 2nd factor as implemented in HTTP Basic Authentication is prohibited by company security policy, and therefore HTTP Basic Authentication is prohibited.

Also, by security policy, passwords have to be changed frequently, so even without that prohibition, password authentication would be very cumbersome as frequent changes result in frequent breakdown of the Atlascode login in VS Code.

Right now, the Atlascloud plugin supports authenticating to Jira using PAT because of a requirement by a customer, but the same has not been extended to Bitbucket, it only supports using username/password (Basic Authentication).

curl -v --oauth2-bearer $PAT https:///rest/api/1.0/users/userslug?avatarSize=48

Bearer Authorization is already available in atlascode, but not yet enabled for Bitbucket, it just was requested for Jira and not for Bitbucket:
https://bitbucket.org/atlassianlabs/atlascode/issues/237/allow-saml-sso-as-authentication-method

All that remains for Atlascode is to allow Bearer Authorization for Bitbucket as well.

This is what this PR does. It adds the same option to alternatively use PAT auth for self-hosted Bitbucket like the Jira client of Atlascode already implements.

  • Update clientManager.ts

* VSCODE-1050: PAT auth for hosted BitBucket(like for hosted Jira)

Like the API of Jira and Bitbucket, the API of Bitbucket supports Bearer
Auth using PAT instead of Basic Auth:
https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

A number of other customers have expressed a need for this feature, not
just us (Cloud Software Group): We disallow the use of HTTP Basic Auth
for security reasons for the Confluence, Jira and Bitbucket APIs of our
self-hosted services. Instead, we require the use of Bearer Auth using a
PAT by the users.

A background information for this is that, that your security policy
requires 2FA or alternatively tokens, password authentication without a
2nd factor as implemented in HTTP Basic Authentication is prohibited by
company security policy, and therefore HTTP Basic Authentication is
prohibited.

Also, by security policy, passwords have to be changed frequently, so
even without that prohibition, password authentication would be very
cumbersome as frequent changes result in frequent breakdown of the
Atlascode login in VS Code.

Right now, the Atlascloud plugin supports authenticating to Jira using
PAT because of a requirement by a customer, but the same has not been
extended to Bitbucket, it only supports using username/password (Basic
Authentication).

curl -v --oauth2-bearer $PAT https://<self-hosted bitbucket server>/rest/api/1.0/users/userslug?avatarSize=48

Bearer Authorization is already available in atlascode, but not yet
enabled for Bitbucket, it just was requested for Jira and not for
Bitbucket:
https://bitbucket.org/atlassianlabs/atlascode/issues/237/allow-saml-sso-as-authentication-method

All that remains for Atlascode is to allow Bearer Authorization for Bitbucket as well.

This is what this PR does. It adds the same option to alternatively use
PAT auth for self-hosted Bitbucket like the Jira client of Atlascode
already implements.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@gmx.de>

* Update clientManager.ts

---------

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@gmx.de>
Co-authored-by: Bernhard Kaindl <bernhard.kaindl@gmx.de>
@bwieger-atlassian-com
Copy link
Collaborator Author

image

Proof of the UI working

@bwieger-atlassian-com bwieger-atlassian-com merged commit 8b417fc into main Dec 17, 2024
2 checks passed
@bwieger-atlassian-com bwieger-atlassian-com deleted the bwieger-community-pr branch December 17, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants