Okta

Setting Up Okta Single Sign-On (SSO)

In this page we will see the process of setting up Okta SSO with Codefresh. For the general instructions of SSO setup see the overview page.

Setting Okta as an Identity provider

  1. Log in to your Okta account, or create an account if you don’t have one.
  2. In the general Okta dashboard, to go to the Okta Admin Dashboard, click Admin.

Okta Dashboard

Okta Dashboard
  1. Using the list of shortcuts at the left-hand side of the screen, select Applications.

Okta Applications

Okta Applications
  1. In the Applications page, select Create App Integration.

Create new application

Create new application
  1. In the Create a New Application Integration pop-up window, select OIDC - OpenID Connect as the Sign on method and Web Application as the Application Type. Click Next to proceed.

Choose Sign-on method

Choose Sign-on method
  1. You will now create your OIDC integration. On the General Settings page, provide the following:
  • App Integration name (e.g. Codefresh)
  • Logo (optional). Feel free to download and add this picture
  • Sign-in redirect URI: https://g.codefresh.io/api/auth/<your_codefresh_client_name>/callback. You will extract your Codefresh client name a bit later in the process, so we’ll need to come back to this and update it again - for now please use a temp value such as https://g.codefresh.io/api/auth/temp/callback

OpenID integration

OpenID integration
  1. Click Save to proceed.

Configure Okta integration in Codefresh

Configure the integration settings for Okta in the Codefresh UI and get the value of the Client name on saving the settings.

  1. In the Codefresh UI, go to the SSO Settings page, and select Okta.
  2. Enter the following:
  • Display Name - shown as application name in OKTA.
  • Client ID - your OKTA application client ID (see below).
  • Client secret - your OKTA application client secret (see below).
  • Client Host - your OKTA organization url (e.g https://<company>.okta.com). Do not copy it from the admin view (e.g. https://<company>-admin.okta.com) because it will not work.
  • Access Token (optional) - OKTA API token that will be used to sync groups and users from OKTA to Codefresh. The token can be generated in OKTA by going to the Security tab -> API -> Tokens (see below). Read-only access permissions are needed.
  • App ID - your Codefresh application ID in your OKTA organization that will be used to sync groups and users from OKTA to Codefresh. This ID can be taken by navigating to your Codefresh APP in OKTA and copying it from the URL (see below).

Client ID and secret

Client ID and secret

Access token

Access token

App ID

App ID
  1. Once you save the Identity provider, Codefresh assigns a client-name to it which identifies the SSO configuration. Note it down.

Client name

Client name

Add the client name to the Okta application settings

Copy the Client Name generated on saving the Okta configuration settings, and update the Okta application settings.

  1. Return to your OKTA Application General Settings, and update the following configurations with the client name generated by Codefresh:
  • Login redirect URIs - https://g.codefresh.io/api/auth/<your_codefresh_client_name>/callback
  • Initiate login URI - https://g.codefresh.io/api/auth/<your_codefresh_client_name>

This concludes the SSO setup for Okta.

How Okta syncing works

It is important to notice that syncing with Okta only affects teams/groups, and not individuals/persons.

You can assign an Okta application in both groups and individual people. Codefresh will only sync people that are inside teams. Newly created people in Okta that are not assigned to a team will NOT be synced to Codefresh. You should assign them to a team first, and then they will be synced as part of the team.

Syncing of teams after initial SSO setup

There are two ways that you can set up automatic syncing of teams.

First, you can create a Codefresh pipeline that runs the CLI command codefresh synchronize teams my-okta-client-name -t okta as explained in the pipeline sync page.

Alternatively, you can set up completely automated syncing by enabling the auto-sync toggle found in the top right of the integration:

Automatic team syncing

Automatic team syncing

When enabled, Codefresh syncs teams automatically every 12 hours without the need of a pipeline.

See the overview page on how to test the integration, activate SSO for collaborators and create sync jobs.