2019-08-23 14:22:47 -07:00
---
2022-12-08 15:41:39 -08:00
title_tag: Configuring Okta | SAML SSO
2019-12-18 09:59:20 -08:00
meta_desc: This page provides a walkthrough important aspects of configuring
Okta as a SAML SSO identity provider (IdP).
2023-05-15 15:25:28 -07:00
title: Okta
h1: "SAML: Configuring Okta"
2023-06-08 16:15:52 -07:00
meta_image: /images/docs/meta-images/docs-meta.png
2019-09-11 15:55:11 -07:00
menu:
2023-05-15 15:25:28 -07:00
pulumicloud:
parent: saml
weight: 2
2019-09-11 15:55:11 -07:00
2019-08-23 14:22:47 -07:00
aliases:
- /docs/reference/service/saml-okta/
- /docs/console/accounts/saml/okta/
2023-05-15 15:25:28 -07:00
- /docs/guides/saml/okta/
2019-08-23 14:22:47 -07:00
---
2023-04-11 13:40:50 -07:00
This guide walks you through configuring Okta as a SAML SSO identity provider (IdP) for the Pulumi Cloud.
2019-08-23 14:22:47 -07:00
2019-09-04 17:21:43 -07:00
## Prerequisites
2023-05-15 15:25:28 -07:00
- [Single Sign-On ](/docs/pulumi-cloud/access-management/saml/sso/ )
2019-09-04 17:21:43 -07:00
2019-08-23 14:22:47 -07:00
## Creating the Okta Application
2023-08-04 16:49:21 -07:00
The first step is to create a new Okta Application Integration. Of the various "sign-in methods"
2019-08-23 14:22:47 -07:00
available, choose **SAML 2.0** .

### Configuring the Application
Next you will be guided through a wizard to configure the Okta application. The first step is to
2023-08-04 16:49:21 -07:00
give it a name---Pulumi Cloud for example---and an [icon ](https://www.pulumi.com/brand/ ).
2019-08-23 14:22:47 -07:00

2019-09-04 17:21:43 -07:00
The next step is to configure the SAML application's settings.
2019-08-23 14:22:47 -07:00
2023-08-04 16:49:21 -07:00
{{% notes type="info" %}}
The values you need to use are dependent upon your Pulumi organization name. Be sure to replace `<orgName>` with your actual organization name.
{{% /notes %}}
2019-08-23 14:22:47 -07:00
2019-09-04 17:21:43 -07:00
| SAML Setting | Value |
2019-08-23 14:22:47 -07:00
| --------------- | ----- |
2023-08-04 16:49:21 -07:00
| Single Sign-on URL | `https://api.pulumi.com/login/<orgName>/sso/saml/acs` |
| Audience URI | `https://api.pulumi.com/login/<orgName>/sso/saml/metadata` |
| Default Relay State | `https://api.pulumi.com/login/<orgName>/sso` |
2023-09-05 22:39:33 -07:00
| Name ID Format | `Persistent` |
2023-08-04 16:49:21 -07:00
| App username | `Email` |
2019-08-23 14:22:47 -07:00
2023-08-04 16:49:21 -07:00
{{% notes type="warning" %}}
2023-09-05 22:39:33 -07:00
> **Important:** Do not change the value of the Name ID Format once your users have started using Pulumi. Once a given SAML identity has been associated with a user, any change to the username sent by Okta will result in login failures for that user.
2023-08-04 16:49:21 -07:00
{{% /notes %}}
2019-08-23 14:22:47 -07:00
2019-09-04 17:21:43 -07:00
In addition, you can optionally provide two attribute statements so that users
2019-08-23 14:22:47 -07:00
who sign in with their Okta credentials will have proper user names.
| Attribute | Value |
| --------- | ----- |
| firstName | user.firstName |
| lastName | user.lastName |
2023-08-04 16:49:21 -07:00
If you plan on using [SCIM ](/docs/pulumi-cloud/access-management/scim/okta/ ), you will need to provide the above attributes, in addition to the `email` attribute.
| Attribute | Value |
| --------- | ----- |
| email | user.email |
2019-08-23 14:22:47 -07:00

### User Assignments
After the Pulumi SAML application has been created in Okta, the next step is to assign users to it.
2019-09-04 17:21:43 -07:00
This will grant specific users or groups access to sign into Pulumi with their Okta-provided
2019-08-23 14:22:47 -07:00
credentials.
To assign users or groups to the application, navigate to the **Assignments** tab on the application
page.

## Configuring Your Pulumi Organization
2023-04-11 13:40:50 -07:00
The final step is to configure the Pulumi Cloud with details on your new Okta-based
2019-08-23 14:22:47 -07:00
SAML application. To do this, you need to obtain the IDP metadata document from Okta and then provide
it to Pulumi.
2023-08-04 16:49:21 -07:00
First, navigate to the **Sign On** tab on the application page and click the
**"View SAML setup instructions"** link in the right column.
2019-08-23 14:22:47 -07:00

Next, scroll to the bottom of the setup instructions and select the value in the large text box
with the heading "Provide the following IDP metadata to your SP provider". That's the full SAML
Identity Provider SSO descriptor, which contains all of the settings Pulumi needs to verify
a user's identity.

2023-04-11 13:40:50 -07:00
With the block of XML text in your clipboard, open the Pulumi Cloud and navigate to your SAML
2022-01-20 17:15:20 -06:00
organization. Select the **Settings** tab, and then select **Access Management** .
In the **Membership Requirements** section, select the **Change requirements** button.
Select **SAML SSO** for the IDP and then **Next** .
2019-08-23 14:22:47 -07:00
Paste the IDP metadata descriptor into the bottom card
2022-01-13 09:48:57 -08:00
titled **SAML SSO Settings** . Then select **Save** at the bottom of the card.
2019-08-23 14:22:47 -07:00

2019-09-04 17:21:43 -07:00
Once the IDP metadata descriptor has been saved, you are all set to log into Pulumi.
2019-08-23 14:22:47 -07:00
2023-05-23 11:21:41 -07:00
## Configuring Session Lifetime
The Pulumi Cloud uses the `SessionNotOnOrAfter` attribute in the `AuthnStatement` element to configure the session lifetime. To configure this in Okta, you must use a [SAML assertion inline hook ](https://developer.okta.com/docs/guides/saml-inline-hook/main/ ).
The JSON payload the inline hook sends to Okta should contain the following:
```json
{
"commands": [
{
"type": "com.okta.assertion.patch",
"value": [
{
"op": "add",
"path": "/authentication/sessionLifetime",
"value": 21600 // lifetime in seconds
}
]
}
]
}
```
2019-08-23 14:22:47 -07:00
### Signing into Pulumi using Okta
Members of your Okta application can now sign into Pulumi. Navigate to
[https://app.pulumi.com/signin/sso/ ](https://app.pulumi.com/signin/sso/ ) and enter the
name of your Pulumi organization.
2023-04-11 13:40:50 -07:00

2019-08-23 14:22:47 -07:00
## Troubleshooting
2022-10-26 07:22:15 -07:00
If you run into any troubles configuring Okta, signing into Pulumi, or need some assistance, [contact us ](/about#contact-us ).