Use Bitbucket as your Authentication Provider
This guide will walk you through the steps necessary to configure Bitbucket as the authentication provider for Okteto.
Bitbucket's documentation explains how to create an OAuth Consumer.
Prerequisites
- A working installation of Okteto
- Helm 3.0+ installed on your local machine
- Access to a Bitbucket account with permissions to create an OAuth Consumer
Create the OAuth Consumer
When you create the OAuth Consumer, provide the following values:
Callback URL:
https://okteto.DOMAIN/auth/callback
URL:
https://okteto.DOMAIN
Permissions:
- Account: Email
- Account: Read
Copy the OAuth Consumer Key and OAuth Consumer Secret values. You need them to configure Okteto.
Configure Okteto
When the Bitbucket OAuth Consumer is ready, update the auth section of your Helm configuration file with the following values:
auth:
bitbucket:
enabled: true
clientId: "REPLACE_ME_WITH_YOUR_OAUTH_CONSUMER_KEY"
clientSecret: "REPLACE_ME_WITH_YOUR_OAUTH_CONSUMER_SECRET"
workspace: "REPLACE_ME_WITH_YOUR_BITBUCKET_WORKSPACE"
You can also store the sensitive part of these credentials in a Kubernetes secret.
Upgrade your Okteto instance to apply the new configuration. Upgrade to the same version you already run: it keeps the changes to a minimum and makes any issue easier to troubleshoot.
The workspace field is optional. When you set it, only members of the workspace can log in to Okteto.
An empty workspace field lets any user log in.