Skip to main content
Version: 1.47

Use OpenID Connect (OIDC) as your Authentication Provider

This guide will walk you through the steps necessary to configure OpenID Connect (OIDC) as the authentication provider for Okteto.

note

To configure private registry credentials for Amazon ECR with OIDC federation, see Amazon ECR registry credentials.

The following providers have dedicated guides:

For other providers, follow your provider's documentation to create the application.

note

Your provider must support the UserInfo endpoint to work with Okteto. This authentication option follows the OpenID standard, and Okteto has validated it with Okta, PingIdentity, and GitLab.

Prerequisites​

  • A working installation of Okteto
  • Helm 3.0+ installed on your local machine

Create the OpenID Connect Application​

When you create the application, provide the following values:

  • Start SSO URL: https://okteto.DOMAIN
  • Redirect URIs: https://okteto.DOMAIN, https://okteto.DOMAIN/auth/callback
  • Scopes: openid, email, profile
  • Response Type: code
  • Grant Type: authorization code

Configure Okteto​

When the OpenID Connect application is ready, update the auth section of your Helm configuration file with the following values:

config.yaml
auth:
openid:
enabled: true
clientId: "REPLACE_ME_WITH_YOUR_APPLICATION_CLIENT_ID"
clientSecret: "REPLACE_ME_WITH_YOUR_APPLICATION_CLIENT_SECRET"
group: "REPLACE_ME_WITH_YOUR_GROUP"
endpoints:
issuer: "REPLACE_ME_WITH_YOUR_ISSUER_URL"
authorization: "REPLACE_ME_WITH_YOUR_AUTHORIZATION_URL"
mapping:
externalIDKey: nickname
nameKey: name
emailKey: email
pictureKey: picture
groupsKey: groups

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 group field is optional. When you set it, only members of the group can log in to your Okteto instance. An empty group field lets any user log in.

The issuer and authorization endpoints must match the values that your provider's configuration discovery returns.

The mapping fields are optional. Use them to configure the mapping between Okteto's user attributes and the claim coming from your authentication provider.