-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add documentation pages for the Bitbucket SAAS OAuth flow (#2410)
Add instructions how to configure Bitbucket SAAS OAuth flow
- Loading branch information
Showing
9 changed files
with
158 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
modules/administration-guide/pages/configuring-oauth-1-for-a-bitbucket-server.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
:_content-type: ASSEMBLY | ||
:description: Configuring OAuth 1.0 for a Bitbucket Server | ||
:keywords: configuring-oauth, authorization, bitbucket, bitbucket-server, oauth-1, oauth-1.0 | ||
:navtitle: Configuring OAuth 1.0 for a Bitbucket Server | ||
// :page-aliases: | ||
|
||
[id="configuring-oauth-1-for-a-bitbucket-server_{context}"] | ||
= Configuring OAuth 1.0 for a Bitbucket Server | ||
|
||
To enable users to work with a remote Git repository that is hosted on a Bitbucket Server: | ||
|
||
. Set up an application link (OAuth 1.0) on the Bitbucket Server. | ||
. Apply an application link Secret for the Bitbucket Server. | ||
|
||
include::partial$proc_setting-up-an-application-link-on-the-bitbucket-server.adoc[leveloffset=+1] | ||
|
||
include::partial$proc_applying-an-application-link-secret-for-the-bitbucket-server.adoc[leveloffset=+1] |
17 changes: 0 additions & 17 deletions
17
modules/administration-guide/pages/configuring-oauth-1-for-bitbucket.adoc
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...les/administration-guide/pages/configuring-oauth-2-for-the-bitbucket-cloud.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
:_content-type: ASSEMBLY | ||
:description: Configuring OAuth 2.0 for the Bitbucket Cloud | ||
:keywords: configuring-oauth, authorization, bitbucket, bitbucket-cloud, cloud, oauth-2, oauth-2.0 | ||
:navtitle: Configuring OAuth 2.0 for the Bitbucket Cloud | ||
// :page-aliases: | ||
|
||
[id="configuring-oauth-2-for-the-bitbucket-cloud_{context}"] | ||
= Configuring OAuth 2.0 for the Bitbucket Cloud | ||
|
||
You can enable users to work with a remote Git repository that is hosted in the Bitbucket Cloud: | ||
|
||
. Set up an OAuth consumer (OAuth 2.0) in the Bitbucket Cloud. | ||
. Apply an OAuth consumer Secret for the Bitbucket Cloud. | ||
|
||
include::partial$proc_setting-up-an-oauth-consumer-in-the-bitbucket-cloud.adoc[leveloffset=+1] | ||
|
||
include::partial$proc_applying-an-oauth-consumer-secret-for-the-bitbucket-cloud.adoc[leveloffset=+1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...de/partials/proc_applying-an-oauth-consumer-secret-for-the-bitbucket-cloud.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
:_content-type: PROCEDURE | ||
:description: Applying an OAuth consumer Secret for the Bitbucket Cloud | ||
:keywords: bitbucket, bitbucket-cloud, oauth-consumer, bitbucket-consumer, oauth-consumer-secret, bitbucket-client-secret | ||
:navtitle: Applying an OAuth consumer Secret for the Bitbucket Cloud | ||
// :page-aliases: | ||
|
||
[id="applying-an-oauth-consumer-secret-for-the-bitbucket-cloud_{context}"] | ||
= Applying an OAuth consumer Secret for the Bitbucket Cloud | ||
|
||
Prepare and apply an OAuth consumer Secret for the Bitbucket Cloud. | ||
|
||
.Prerequisites | ||
|
||
* The OAuth consumer is set up in the Bitbucket Cloud. | ||
|
||
* The Base64-encoded values, which were generated when setting up the Bitbucket OAuth consumer, are prepared: | ||
** Bitbucket OAuth consumer Key | ||
** Bitbucket OAuth consumer Secret | ||
|
||
* An active `{orch-cli}` session with administrative permissions to the destination {orch-name} cluster. See {orch-cli-link}. | ||
|
||
.Procedure | ||
|
||
. Prepare the Secret: | ||
+ | ||
[source,yaml,subs="+quotes,+attributes,+macros"] | ||
---- | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: bitbucket-oauth-config | ||
namespace: {prod-namespace} <1> | ||
labels: | ||
app.kubernetes.io/part-of: che.eclipse.org | ||
app.kubernetes.io/component: oauth-scm-configuration | ||
annotations: | ||
che.eclipse.org/oauth-scm-server: bitbucket | ||
type: Opaque | ||
data: | ||
id: __<Base64_Bitbucket_Oauth_Consumer_Key>__ <2> | ||
secret: __<Base64_Bitbucket_Oauth_Consumer_Secret>__ <3> | ||
---- | ||
<1> The {prod-short} namespace. The default is `{prod-namespace}`. | ||
<2> The Base64-encoded *Bitbucket OAuth consumer Key*. | ||
<3> The Base64-encoded *Bitbucket OAuth consumer Secret*. | ||
|
||
. Apply the Secret: | ||
+ | ||
[subs="+quotes,+attributes,+macros"] | ||
---- | ||
$ {orch-cli} apply -f - <<EOF | ||
__<Secret_prepared_in_the_previous_step>__ | ||
EOF | ||
---- | ||
|
||
. Verify in the output that the Secret is created. |
16 changes: 8 additions & 8 deletions
16
...ng-up-the-bitbucket-application-link.adoc → ...ication-link-on-the-bitbucket-server.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...on-guide/partials/proc_setting-up-an-oauth-consumer-in-the-bitbucket-cloud.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
:_content-type: PROCEDURE | ||
:description: Setting up an OAuth consumer in the Bitbucket Cloud | ||
:keywords: bitbucket, bitbucket-cloud, oauth-consumer, bitbucket-oauth-consumer, oauth-application | ||
:navtitle: Setting up an OAuth consumer in the Bitbucket Cloud | ||
// :page-aliases: | ||
|
||
[id="setting-up-an-oauth-consumer-in-the-bitbucket-cloud_{context}"] | ||
= Setting up an OAuth consumer in the Bitbucket Cloud | ||
|
||
Set up an OAuth consumer for OAuth 2.0 in the Bitbucket Cloud. | ||
|
||
.Prerequisites | ||
|
||
* You are logged in to the Bitbucket Cloud. | ||
* link:https://www.gnu.org/software/coreutils/base64[`base64`] is installed in the operating system you are using. | ||
|
||
.Procedure | ||
|
||
. Click your avatar and go to the *All workspaces* page. | ||
|
||
. Select a workspace and click it. | ||
|
||
. Go to menu:Settings[OAuth consumers > Add consumer]. | ||
|
||
. Enter *{prod-short}* as the *Name*. | ||
|
||
. Enter `pass:c,a,q[{prod-url}]/api/oauth/callback` as the *Callback URL*. | ||
|
||
. Under *Permissions*, check all of the *Account* and *Repositories* checkboxes, and click *Save*. | ||
|
||
. Expand the added consumer and then copy the *Key* value and encode it to Base64 for use when applying the Bitbucket OAuth consumer Secret: | ||
+ | ||
[subs="+quotes,+attributes,+macros"] | ||
---- | ||
$ echo -n '__<bitbucket_oauth_consumer_key>__' | base64 | ||
---- | ||
|
||
. Copy the *Secret* value and encode it to Base64 for use when applying the Bitbucket OAuth consumer Secret: | ||
+ | ||
[subs="+quotes,+attributes,+macros"] | ||
---- | ||
$ echo -n '__<bitbucket_oauth_consumer_secret>__' | base64 | ||
---- | ||
|
||
.Additional resources | ||
|
||
* link:https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud[Bitbucket Docs: Use OAuth on Bitbucket Cloud] |