{"token_count": 2258}

# Identity Governance with Okta

Identity Governance is available only with Teleport Enterprise.

This guide shows how to connect Okta to Teleport and use Okta groups to govern access to your infrastructure. You will set up the Okta integration to sync users and groups, then use Access Lists to:

- Give the members of one Okta group standing access to servers.
- Let the members of another Okta group request just-in-time access to a database, with approval from a third group.

Okta admins keep managing people and groups in Okta. Teleport decides what each group can access, and who is accountable for it.

---

WORKSHOP ENVIRONMENT

The [workshop environment](https://goteleport.com/docs/ver/19.x/workshops/workshop-environment.md) runs an Okta simulator at <https://okta.localhost:9443>.

---

## How it works

Okta integration has four parts:

|                    | Description                                                                                                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| SSO                | Creates a SAML connector named `okta` so users assigned to the Teleport app in Okta can log in to Teleport.                |
| User sync          | Teleport periodically pulls users from Okta and creates or removes the matching Teleport users.                            |
| SCIM               | Okta pushes user changes to Teleport.                                                                                      |
| App and group sync | Creates an Access List for each Okta group, and each Okta app, that has assignments. Membership of each list mirrors Okta. |

Synced Okta users get the `okta-requester` role, which lets them log in and request access but grants no standing access to resources. Okta-synced Access Lists only grant access to the Okta group or app they represent.

To give an Okta group access to Teleport-protected infrastructure, you add its Okta-synced Access List as a member of an Access List that you create in Teleport.

## Prerequisites

- A Teleport Enterprise cluster with Identity Governance.

- A Teleport user with the `editor` role.

- An Okta organization where you can create apps and manage group assignments.

- At least one SSH server and one database enrolled in Teleport, with labels you can select them by.

- Two Okta groups to grant access to, and one group to approve requests. Each group must be assigned to at least one Okta app, because the integration only syncs groups with assignments. This guide uses these groups:

  - `admins`: gets standing access to servers and approves database access requests.
  - `readonly`: requests just-in-time access to the database.

---

WORKSHOP ENVIRONMENT

- Sign in to <https://teleport.localhost:3080> with the default Duo login and choose **Andrew Admin**. This user has the `editor` role.
- The cluster has an SSH server and a PostgreSQL database, both labeled `env: docker`.
- The Okta simulator has three users, Andrew Admin, Randy Reviewer, and Roger Requester, with `@okta.example.com` logins. Andrew and Randy are in `admins`, and Roger is in `readonly`. Both groups are assigned to Okta apps.

---

## Step 1/4. Connect Okta to Teleport

---

REAL OKTA

The workshop environment runs a simulated Okta organization. To configure a real Okta org, follow respective guides:

- [Okta SSO](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/guided-sso.md)
- [Okta SCIM](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/scim-integration.md)
- [Okta User Sync](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/user-sync.md)
- [Okta App and Group Sync](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/app-and-group-sync.md)

You can also configure Okta side of the integration using [Terraform](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/terraform.md).

---

In the Teleport Web UI, go to **Add New** > **Integration** and select the **Okta** tile. The guided flow walks you through each part of the integration.

### SSO

Setting up SSO lets users log into Teleport via Okta SAML application. The workshop environment simulates an Okta tenant with a preconfigured SAML app and groups assigned to it.

Paste the **SAML app metadata URL** from the [simulator home page](https://okta.localhost:9443):

```
https://okta.localhost:9443/sso/saml/metadata

```

### SCIM

Okta SCIM integration synchronizes Okta users into Teleport by pushing users assigned to Okta's Teleport SAML app to Teleport. Deprovisioned and unassigned users are automatically locked and removed from Teleport.

Update the SCIM configuration to save the SCIM token, then enter the Teleport SCIM URL and the token in the provisioning settings of the Okta app. See [Okta SCIM Integration](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta/scim-integration.md):

```
https://teleport.localhost:3080/v1/webapi/scim/okta

```

Paste the base URL and token under **Provisioning** on the simulator home page, then click **Save and push**.

### User sync

User sync uses Okta API Services to brings Okta users into Teleport. It is slower than SCIM due to the polling nature but serves as a fallback if SCIM requests can't reach your Teleport cluster.

The workshop's Okta simulator will accept any client ID.

All synced users get an internal `okta-requester` role by default that doesn't grant any standing permissions but allows users to see and request access to Okta applications synced to Teleport.

### App and group sync

App and group sync uses Okta API Services to bring Okta groups and apps into Teleport. It periodically syncs all Okta applications into Teleport and creates Access Lists for each Okta user group with assignments.

---

APPS SYNC

Note that Teleport will sync each Okta app its API Services app sees. Use Okta resource sets if you need to limit which apps are synced.

---

Membership of each Access List reflects the membership of the corresponding Okta group and is maintained up-to-date by the integration. Okta Access Lists sync supports bidirectional as well which results in Teleport taking ownership of Okta groups and any changes made in Teleport Access Lists being pushed back to Okta.

Add `andrew.admin@duo.example.com` as a default owner, and sync all groups.

At this point, Okta users and groups should be synced to Teleport. When a user is added to an Okta group, Teleport adds them to the group's Okta-synced Access List, and they get the access granted through it at their next login. When they leave the group, they are removed from the corresponding Access List as well.

## Step 2/4. Grant standing access to an Okta group

In this step you will give members of the `admins` Okta group access to your servers whenever they log in.

Go to [Create New Access List](https://teleport.localhost:3080/web/accesslists/new) and follow the **Standing Access Guide** to create an Access List that grants access to selected resources.

The workshop environment includes an SSH server labeled `env: docker`. Use it to grant access to the Okta `admins` group. You can create an Access List directly in Teleport or use the generated terraform to include it in your infrastructure as code.

Members of the Okta group now inherit the list's access through nesting. The Okta-synced list stays managed by Okta.

To verify, log in to Teleport via Okta connector as a member of the `admins` group, for example **Andrew Admin** in the workshop environment. The servers now appear in the resource list.

## Step 3/4. Let an Okta group request just-in-time access

In this step you will let members of the `readonly` Okta group request temporary access to a database with members of the `admins` group reviewing their requests.

Go to [Create New Access List](https://teleport.localhost:3080/web/accesslists/new) and follow the **Just-in-Time Access Guide** to create an Access List that grants Access Request permissions to a database.

Pick `readonly` Okta Access List as a list member and `admins` Okta Access List as list owner.

## Step 4/4. Request and approve access

Log in as a member of the `readonly` group via Okta SSO connector, for example **Roger Requester**. The database appears in the resource list as a requestable resource. Submit an Access Request.

Re-login as a member of the `admins` group and approve the request from the [Access Requests](https://teleport.localhost:3080/web/requests) page. The requester can now assume the access and connect to the database.

Log in back as the requester, open the approved request and click **Assume Roles**. You can now connect to the database. The access ends when the request expires or the user's session ends.

## Further reading

- [Okta integration overview](https://goteleport.com/docs/ver/19.x/identity-governance/integrations/okta.md)
- [Creating an Access List for Standing Access](https://goteleport.com/docs/ver/19.x/identity-governance/access-lists/standing-access-list.md)
- [Creating an Access List for Just-in-Time Access](https://goteleport.com/docs/ver/19.x/identity-governance/access-lists/jit-access-list.md)
- [Nested Access Lists](https://goteleport.com/docs/ver/19.x/identity-governance/access-lists/nested-access-lists.md)
- [Access Requests](https://goteleport.com/docs/ver/19.x/identity-governance/access-requests.md)
