Skip to content
LogScale Self-Hosted
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

### Authenticate with BitBucket sign-in

Learn how to configure BitBucket as a single sign-in authentication method for LogScale, including the required permissions, OAuth Consumer setup, and the necessary configuration file settings. The process involves setting up callback URLs and permissions in BitBucket, obtaining client credentials, and adding specific authentication parameters to the LogScale configuration file, with optional HTTP proxy support for token endpoints.

To use BitBucket as a single sign-on method with LogScale you first need to create an OAuth consumer in BitBucket. Then you must configure LogScale with the metadata created as part of that OAuth consumer.

#### Create a BitBucket OAuth Consumer

First, you have to set up BitBucket. Once you do, go to Account Settings and create an OAuth Consumer.

Set the `Callback URL` to `%PUBLIC_URL%/auth/bitbucket`. Then grant the `account:email` permission and Save.

Once that's done, find the Key (Client Id), and Secret (Client Secret) in the list of consumers. You'll need that to configure LogScale's configuration file. You can read more about integrating an application on BitBucket on their Setup Instructions.

#### Configure LogScale to authenticate with BitBucket

Now that your consumer is created, you can configure LogScale to use authentication with BitBucket. This is configured through configuration variables in the LogScale configuration. To learn more about setting configuration, see Configuration Settings.

Edit the LogScale configuration file to include the following lines:

ini

    AUTHENTICATION_METHOD=oauth
    PUBLIC_URL=$YOUR_SERVERS_BASE_URL
    BITBUCKET_OAUTH_CLIENT_ID=$CLIENT_ID # The Key from your BitBucket OAuth Consumer
    BITBUCKET_OAUTH_CLIENT_SECRET=$CLIENT_SECRET # The Secret your BitBucket OAuth Consumer
    AUTO_CREATE_USER_ON_SUCCESSFUL_LOGIN=true  # default is false

To have calls to the token endpoint for BitBucket use the cluster's HTTP proxy settings, add the `BITBUCKET_OAUTH_USE_HTTP_PROXY` configuration and set the value to true.

#### Enter search term