Skip to content

Commit

Permalink
Merge pull request #84 from packagist/bitbucket-server-oauth2
Browse files Browse the repository at this point in the history
Bitbucket Server: add OAuth2 docs
  • Loading branch information
glaubinix committed Feb 5, 2024
2 parents e31375e + 9b82179 commit 3000a7d
Show file tree
Hide file tree
Showing 23 changed files with 141 additions and 56 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 22 additions & 25 deletions docs/cloud/bitbucket-server-integration-setup.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
# Bitbucket Data Center / Server Integration Setup
## Private Packagist Cloud

## Initial Setup
<div class="row column">
<div class="callout warning">
<p>Note: Application Links using OAuth 2 are available since Bitbucket Data Center / Server v7.21. If you are using an older Bitbucket Data Center / Server version then consult the<a href="/docs/cloud/bitbucket-server-oauth1-integration-setup.md">Bitbucket Data Center / Server OAuth 1 setup guide</a>.</p>
</div>
</div>

From the organization settings page, select the "Integrations" subtab. Hit the "Add Integration" button on the integrations listing page to get to the form below.
To set up a Bitbucket Data Center / Server integration with Private Packagist start by selecting "Bitbucket Data Center / Server" as the platform and enter the URL of your on-premise Bitbucket Server into the base URL field as seen in the example below.
## Initial Setup
From the organization settings page, select the "Integrations" subtab.
Hit the "Add Integration" button on the integrations listing page to get to the form below.
To set up a Bitbucket Data Center / Server integration with Private Packagist, start by selecting "Bitbucket Data Center / Server"
as the platform, enter the URL of your on-premise Bitbucket Data Center / Server into the base URL field and select OAuth 2 as the OAuth version as seen in the example below.

![Packagist Setup](/Resources/public/img/docs/integration-setup/cloud/bitbucket-server-01-packagist-setup.png)

Submit the form to see the additional information.

![Packagist Form](/Resources/public/img/docs/integration-setup/cloud/bitbucket-server-02-packagist-details.png)
Copy the content from the "Callback URL / Redirect URL" field and follow the link to set up an Application Link.

## Configure Application link
Click on the link to setup an Application Link on Bitbucket Data Center / Server. You will need the "Client Id" and the "Public Key" shown in the form.

![Bitbucket Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-03-bitbucket-configure-application-link.png)

For Bitbucket Data Center versions 7.21 and newer, select "Atlassian product" and not "External application" to be able to set up an OAuth1 link.

After you hit the button to create a new Application Link a configuration window may appear. If it does, verify that the url matches your Private Packagist URL and hit "Continue", otherwise skip this step.

![Bitbucket Invalid Url](/Resources/public/img/docs/integration-setup/bitbucket-server-04-bitbucket-invalid-url.png)

Now setup a "Generic Application". The only field required is the "Application Name". Submit the form to finish creating the Application Link.
Click on the link to setup an Application Link on Bitbucket Data Center / Server and select "External application" as type and "Incoming" as direction.

![Bitbucket Setup Link](/Resources/public/img/docs/integration-setup/bitbucket-server-05-bitbucket-setup-link.png)
![Bitbucket Data Center / Server Create Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-02-bitbucket-create-application-link.png)

![Bitbucket Application Created](/Resources/public/img/docs/integration-setup/bitbucket-server-06-bitbucket-application-created.png)
After you click the button to continue, enter a name and the content from the "Callback URL / Redirect URL" from the Private Packagist form.
Select Repositories "Read" as application permission and save the form.

Click on the pen icon to the right of the application you just created to edit the Application Link and configure Incoming Authentication.
![Bitbucket Data Center / Server Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-03-bitbucket-configure-application-link.png)

![Bitbucket Incoming Auth](/Resources/public/img/docs/integration-setup/bitbucket-server-07-bitbucket-incoming-auth.png)
## Finish the Setup

This is where we will need the "Client ID" and the "Public Key" that were previously generated on the Private Packagist integration form. Make sure the entire content of the "Public Key" field gets copied and the "Consumer Callback" field stays empty. Submit the form and go back to Private Packagist.
Once the form is saved, Bitbucket Data Center / Server will show you the Client ID and secret.
Copy them over to Private Packagist and save the integration.

## Configure Bitbucket Server plugins

In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Server then you will need to enable the OAuth whitelist
otherwise Private Packagist will not be able to authenticate with the Bitbucket Server.
In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Data Center / Server then you will need to enable the OAuth whitelist
otherwise Private Packagist won't be able to authenticate with the Bitbucket Data Center / Server.

![Bitbucket Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)
![Bitbucket Data Center / Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)
47 changes: 47 additions & 0 deletions docs/cloud/bitbucket-server-oauth1-integration-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Bitbucket Data Center / Server Integration Setup (OAuth 1)
## Private Packagist Cloud

## Initial Setup

From the organization settings page, select the "Integrations" subtab.
Hit the "Add Integration" button on the integrations listing page to get to the form below.
To set up a Bitbucket Data Center / Server integration with Private Packagist, start by selecting "Bitbucket Data Center / Server"
as the platform, enter the URL of your on-premise Bitbucket Data Center / Server into the base URL field and select OAuth 1 as the OAuth version as seen in the example below.

![Packagist Setup](/Resources/public/img/docs/integration-setup/cloud/bitbucket-server-oauth1-01-packagist-setup.png)

Submit the form to see the additional information.

![Packagist Form](/Resources/public/img/docs/integration-setup/cloud/bitbucket-server-oauth1-02-packagist-details.png)

## Configure Application link
Click on the link to setup an Application Link on Bitbucket Data Center / Server. You will need the "Client Id" and the "Public Key" shown in the form.

![Bitbucket Data Center / Server Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-03-bitbucket-configure-application-link.png)

For Bitbucket Data Center versions 7.21 and newer, select "Atlassian product" and not "External application" to be able to set up an OAuth1 link.

After you hit the button to create a new Application Link a configuration window may appear. If it does, verify that the url matches your Private Packagist URL and hit "Continue", otherwise skip this step.

![Bitbucket Data Center / Server Invalid Url](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-04-bitbucket-invalid-url.png)

Now setup a "Generic Application". The only field required is the "Application Name". Submit the form to finish creating the Application Link.

![Bitbucket Data Center / Server Setup Link](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-05-bitbucket-setup-link.png)

![Bitbucket Data Center / Server Application Created](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-06-bitbucket-application-created.png)

Click on the pen icon to the right of the application you just created to edit the Application Link and configure Incoming Authentication.

![Bitbucket Data Center / Server Incoming Auth](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-07-bitbucket-incoming-auth.png)

This is where we will need the "Client ID" and the "Public Key" that were previously generated on the Private Packagist integration form.
Enter the "Client ID" into the "Consumer Key" field, make sure the entire content of the "Public Key" field gets copied and the "Consumer Callback" field stays empty.
Submit the form and go back to Private Packagist.

## Configure Bitbucket Server plugins

In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Data Center / Server then you will need to enable the OAuth whitelist
otherwise Private Packagist won't be able to authenticate with the Bitbucket Data Center / Server.

![Bitbucket Data Center / Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)
53 changes: 22 additions & 31 deletions docs/self-hosted/bitbucket-server-integration-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,41 @@
This guide explains how to setup an OAuth integration for Private Packagist Self-Hosted with Bitbucket Data Center / Server integration.
If you are using our cloud product at packagist.com, [use this guide](../cloud/bitbucket-server-integration-setup.md).

## Initial Setup
Hit the “Add Integration“ button on the admin page to get to the form below.

![Add Integration](/Resources/public/img/docs/self-hosted/08-integration.png)
<div class="row column">
<div class="callout warning">
<p>Note: Application Links using OAuth 2 are available since Bitbucket Data Center / Server v7.21. If you are using an older Bitbucket Data Center / Server version then consult the<a href="/docs/self-hosted/bitbucket-server-oauth1-integration-setup.md">Bitbucket Data Center / Server OAuth 1 setup guide</a>.</p>
</div>
</div>

To setup a Bitbucket Data Center / Server integration with Private Packagist start by selecting "Bitbucket Data Center / Server" as the platform and enter the URL of your on-premise Bitbucket Server into the base URL field as seen in the example below.
## Initial Setup
Hit the “Add integration“ button on the admin page to get to the form below.
To setup a Bitbucket Data Center / Server integration with Private Packagist, start by selecting "Bitbucket Data Center / Server"
as the platform, enter the URL of your on-premise Bitbucket Data Center / Server into the base URL field and select OAuth 2 as the OAuth version as seen in the example below.

![Packagist Setup](/Resources/public/img/docs/integration-setup/bitbucket-server-01-packagist-setup.png)

Submit the form to see the additional information.

![Packagist Form](/Resources/public/img/docs/integration-setup/bitbucket-server-02-packagist-form.png)
Copy the content from the "Callback URL / Redirect URL" field and follow the link to set up an Application Link.

## Configure Application link
Click on the link to setup an Application Link on Bitbucket Data Center / Server. You will need the "Client Id" and the "Public Key" shown in the form.

![Bitbucket Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-03-bitbucket-configure-application-link.png)

For Bitbucket Data Center versions 7.21 and newer, select "Atlassian product" and not "External application" to be able to set up an OAuth1 link.
Click on the link to setup an Application Link on Bitbucket Data Center / Server and select "External application" as type and "Incoming" as direction.

After you hit the button to create a new Application Link a configuration window may appear. If it does, verify that the url matches your Private Packagist URL and hit "Continue", otherwise skip this step.
![Bitbucket Data Center / Server Create Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-02-bitbucket-create-application-link.png)

![Bitbucket Invalid Url](/Resources/public/img/docs/integration-setup/bitbucket-server-04-bitbucket-invalid-url.png)
After you click the button to continue, enter a name and the content from the "Callback URL / Redirect URL" from the Private Packagist form.
Select Repositories "Read" as application permission and save the form.

Now setup a "Generic Application". The only field required is the "Application Name". Submit the form to finish creating the Application Link.

![Bitbucket Setup Link](/Resources/public/img/docs/integration-setup/bitbucket-server-05-bitbucket-setup-link.png)

![Bitbucket Application Created](/Resources/public/img/docs/integration-setup/bitbucket-server-06-bitbucket-application-created.png)

Click on the pen icon to the right of the application you just created to edit the Application Link and configure Incoming Authentication.

![Bitbucket Incoming Auth](/Resources/public/img/docs/integration-setup/bitbucket-server-07-bitbucket-incoming-auth.png)

This is where we will need the "Client ID" and the "Public Key" that were previously generated on the Private Packagist integration form. Make sure the entire content of the "Public Key" field gets copied and the "Consumer Callback" field stays empty. Submit the form and go back to Private Packagist.
![Bitbucket Data Center / Server Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-03-bitbucket-configure-application-link.png)

## Finish the Setup
Update the Integration on Private Packagist to save everything and finish the setup.

![Packagist Finalize](/Resources/public/img/docs/integration-setup/bitbucket-server-08-packagist-finalize.png)
Once the form is saved, Bitbucket Data Center / Server will show you the Client ID and secret.
Copy them over to Private Packagist and save the integration.

![Packagist Finalize](/Resources/public/img/docs/integration-setup/bitbucket-server-04-packagist-finalize.png)

## Configure Bitbucket Server plugins

In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Server then you will need to enable the OAuth whitelist
otherwise Private Packagist will not be able to authenticate with the Bitbucket Server.
In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Data Center / Server then you will need to enable the OAuth whitelist
otherwise Private Packagist won't be able to authenticate with the Bitbucket Data Center / Server.

![Bitbucket Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)
![Bitbucket Data Center / Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)
50 changes: 50 additions & 0 deletions docs/self-hosted/bitbucket-server-oauth1-integration-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Bitbucket Data Center / Server Integration Setup (OAuth 1)
## Private Packagist Self-Hosted

## Initial Setup
Hit the “Add integration“ button on the admin page to get to the form below.
To setup a Bitbucket Data Center / Server integration with Private Packagist, start by selecting "Bitbucket Data Center / Server"
as the platform, enter the URL of your on-premise Bitbucket Data Center / Server into the base URL field and select OAuth 1 as the OAuth version as seen in the example below.

![Packagist Setup](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-01-packagist-setup.png)

Submit the form to see the additional information.

![Packagist Form](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-02-packagist-form.png)

## Configure Application link
Click on the link to setup an Application Link on Bitbucket Data Center / Server. You will need the "Client Id" and the "Public Key" shown in the form.

![Bitbucket Data Center / Server Configure Application Link](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-03-bitbucket-configure-application-link.png)

For Bitbucket Data Center versions 7.21 and newer, select "Atlassian product" and not "External application" to be able to set up an OAuth1 link.

After you hit the button to create a new Application Link a configuration window may appear. If it does, verify that the url matches your Private Packagist URL and hit "Continue", otherwise skip this step.

![Bitbucket Data Center / Server Invalid Url](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-04-bitbucket-invalid-url.png)

Now setup a "Generic Application". The only field required is the "Application Name". Submit the form to finish creating the Application Link.

![Bitbucket Data Center / Server Setup Link](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-05-bitbucket-setup-link.png)

![Bitbucket Data Center / Server Application Created](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-06-bitbucket-application-created.png)

Click on the pen icon to the right of the application you just created to edit the Application Link and configure Incoming Authentication.

![Bitbucket Data Center / Server Incoming Auth](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-07-bitbucket-incoming-auth.png)

This is where we will need the "Client ID" and the "Public Key" that were previously generated on the Private Packagist integration form.
Enter the "Client ID" into the "Consumer Key" field, make sure the entire content of the "Public Key" field gets copied and the "Consumer Callback" field stays empty.
Submit the form and go back to Private Packagist.

## Finish the Setup
Update the Integration on Private Packagist to save everything and finish the setup.

![Packagist Finalize](/Resources/public/img/docs/integration-setup/bitbucket-server-oauth1-08-packagist-finalize.png)

## Configure Bitbucket Data Center / Server plugins

In case the U2F & TOTP plugin by Alpha Server is installed on the Bitbucket Data Center / Server then you will need to enable the OAuth whitelist
otherwise Private Packagist won't be able to authenticate with the Bitbucket Data Center / Server.

![Bitbucket Data Center / Server TFA Configuration](/Resources/public/img/docs/integration-setup/bitbucket-server-09-tfa.png)

0 comments on commit 3000a7d

Please sign in to comment.