Skip to content

Commit 77af217

Browse files
feat: Okta support for SCIM (#949)
* enhances existing SCIM documentation for Okta * adds sections to SAML and OAuth2.0 docs for Okta --------- Co-authored-by: Kathryn May <[email protected]>
1 parent 67114b7 commit 77af217

File tree

4 files changed

+213
-34
lines changed

4 files changed

+213
-34
lines changed

docs/administration/how_to_guides/organization_management/set_up_saml_sso.mdx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ These are instructions for setting up LangSmith SAML SSO with Entra ID (formerly
111111

112112
For additional information, see Microsoft's [documentation](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/add-application-portal-setup-sso).
113113

114-
**Step 1: Create a new Entra ID application integration**
114+
<span id="create-application-entra-id">
115+
<b>Step 1: Create a new Entra ID application integration</b>
116+
</span>
115117

116118
1. Log in to the [Azure portal](https://portal.azure.com/#home) with a privileged role (e.g. Global Administrator). On the left navigation pane, select the `Entra ID` service.
117119
1. Navigate to Enterprise Applications and then select All Applications.
@@ -199,14 +201,38 @@ For additional information, see Okta's [documentation](https://help.okta.com/en-
199201

200202
**Step 1: Create and configure the Okta SAML application**
201203

204+
**Via Okta Integration Network (recommended)**
205+
206+
1. Sign in to [Okta](https://login.okta.com/).
207+
1. In the upper-right corner, select Admin. The button is not visible from the Admin area.
208+
1. Select `Browse App Integration Catalog`.
209+
1. Find and select the LangSmith application.
210+
1. On the application overview page, select Add Integration.
211+
1. Fill in `ApiUrlBase`:
212+
- US: `api.smith.langchain.com`
213+
- EU: `eu.api.smith.langchain.com`
214+
1. Fill in `AuthHost`:
215+
- US: `auth.langchain.com`
216+
- EU: `eu.auth.langchain.com`
217+
1. Fill in `LangSmithUrl`: Same as `ApiUrlBase`
218+
1. Under Application Visibility, keep the box unchecked.
219+
1. Select Next.
220+
1. Select `SAML 2.0`.
221+
1. Fill in `Sign-On Options`:
222+
- `Application username format`: `Email`
223+
- `Update application username on`: `Create and update`
224+
- `Allow users to securely see their password`: leave **unchecked**.
225+
226+
**Via Custom App Integration**
227+
202228
1. Log in to Okta as an administrator, and go to the `Okta Admin console`.
203229
1. Under `Applications > Applications` click `Create App Integration`
204230
1. Select `SAML 2.0`
205231
1. Enter an `App name` (e.g. `LangSmith`) and optionally an `App logo`, then click `Next`
206232
1. Enter the following information in the `Configure SAML` page:
207233
1. `Single sign-on URL` a.k.a. `ACS URL`: <RegionalUrl type='auth' suffix='/auth/v1/sso/saml/acs'/>. Keep `Use this for Recipient URL and Destination URL` checked.
208234
1. `Audience URI (SP Entity ID)`: <RegionalUrl type='auth' suffix='/auth/v1/sso/saml/metadata'/>
209-
1. `Name ID format`: `EmailAddress`
235+
1. `Name ID format`: **Persistent**
210236
1. `Application username`: `email`
211237
1. Leave the rest of the fields empty or set to their default.
212238
1. Click `Next

docs/administration/how_to_guides/organization_management/set_up_scim.mdx

Lines changed: 139 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RegionalUrl } from "@site/src/components/RegionalUrls";
22

3-
# SCIM User Provisioning (Beta)
3+
# SCIM User Provisioning
44

55
System for Cross-domain Identity Management (SCIM) is an open standard that allows for the automation of user provisioning. Using SCIM, you can automatically provision and deprovision users in your LangSmith organization and workspaces, keeping user access synchronized with your organization's identity provider.
66

@@ -9,7 +9,7 @@ SCIM is available for organizations on the [Enterprise plan](https://www.langcha
99

1010
SCIM is available on Helm chart versions 0.10.41 (application version 0.10.108) and later.
1111

12-
While in Beta, SCIM support is API-only (see instructions below).
12+
SCIM support is API-only (see instructions below).
1313
:::
1414

1515
## What is SCIM?
@@ -24,15 +24,7 @@ SCIM enables automatic user provisioning and deprovisioning between your identit
2424
- **Consistent access control**: User attributes and group memberships are synchronized between systems
2525
- **Scalable**: Efficiently manage large teams with many workspaces and custom roles
2626

27-
## Prerequisites
28-
29-
- Your organization must be on an Enterprise plan
30-
- Your Identity Provider (IdP) must support SCIM 2.0
31-
- Only [Organization Admins](../../concepts#organization-roles) can configure SCIM
32-
- For cloud customers: [SAML SSO](./set_up_saml_sso.mdx) must be configured for your organization
33-
- For self-hosted customers: [OAuth with Client Secret](../../../self_hosting/configuration/sso#with-secret) authentication mode must be enabled
34-
35-
## Capabilities
27+
## Supported Features
3628

3729
SCIM enables the following capabilities:
3830

@@ -42,7 +34,27 @@ SCIM enables the following capabilities:
4234
- **Group-based access**: Sync membership from IdP user groups to LangSmith workspaces
4335
- **Role assignment**: Select specific [Organization Roles](../../concepts#organization-roles) and [Workspace Roles](../../concepts#workspace-roles) for groups of users
4436

45-
## Role Precedence
37+
SCIM is supported for these authentication methods:
38+
39+
- Cloud: [SAML SSO](./set_up_saml_sso.mdx)
40+
- Self-hosted: [OAuth2.0 with Client Secret](../../../self_hosting/configuration/sso#with-secret)
41+
42+
## Requirements
43+
44+
### Prerequisites
45+
46+
- Your organization must be on an Enterprise plan.
47+
- Your Identity Provider (IdP) must support SCIM 2.0.
48+
- Only [Organization Admins](../../concepts#organization-roles) can configure SCIM.
49+
- For cloud customers: [SAML SSO](./set_up_saml_sso.mdx) must be configurable for your organization.
50+
- For self-hosted customers: [OAuth with Client Secret](../../../self_hosting/configuration/sso#with-secret) authentication mode must be enabled.
51+
- For self-hosted customers, network traffic must be allowed from the identity provider to LangSmith:
52+
- Microsoft Entra ID supports allowlisting IP ranges or an agent-based solution to provide connectivity.
53+
([details](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/use-scim-to-provision-users-and-groups#ip-ranges)).
54+
- Okta supports allow-listing IPs or domains ([details](https://help.okta.com/en-us/content/topics/security/ip-address-allow-listing.htm))
55+
or an agent-based solution ([details](https://help.okta.com/en-us/content/topics/provisioning/opp/opp-main.htm)) to provide connectivity.
56+
57+
### Role Precedence
4658

4759
When a user belongs to multiple groups for the same workspace, the following precedence applies:
4860

@@ -55,11 +67,19 @@ When a group is deleted or a user is removed from a group, their access is updat
5567
SCIM group membership will override manually-assigned roles or roles assigned via Just-in-Time (JIT) provisioning. We recommend disabling JIT provisioning to avoid conflicts.
5668
:::
5769

58-
## Group Naming Convention
70+
### Email Verification
71+
72+
In cloud only, creating a new user with SCIM triggers an email to the user.
73+
They must verify their email address by clicking the link in this email.
74+
The link expires in 24 hours, and can be resent if needed by removing and re-adding the user via SCIM.
75+
76+
## Attributes and Mapping
77+
78+
### Group Naming Convention
5979

6080
Group membership maps to LangSmith Workspace membership and workspace roles with a specific naming convention:
6181

62-
### Organization Admin Groups
82+
#### Organization Admin Groups
6383

6484
Format: `<optional_prefix>Organization Admin` or `<optional_prefix>Organization Admins`
6585

@@ -69,7 +89,7 @@ Examples:
6989
- `Groups-Organization Admins`
7090
- `Organization Admin`
7191

72-
### Workspace-Specific Groups
92+
#### Workspace-Specific Groups
7393

7494
Format: `<optional_prefix><org_role_name>:<workspace_name>:<workspace_role_name>`
7595

@@ -79,17 +99,47 @@ Examples:
7999
- `Groups-Organization User:Engineering:Developers`
80100
- `Organization User:Marketing:Viewers`
81101

82-
## Email verification
102+
### Mapping
83103

84-
In cloud only, creating a new user with SCIM triggers an email to the user.
85-
They must verify their email address by clicking the link in this email.
86-
The link expires in 24 hours, and can be resent if needed by removing and re-adding the user via SCIM.
104+
While specific instructions depending on the identity provider may vary, these mappings show what is supported by the LangSmith SCIM integration:
105+
106+
#### User Attributes
107+
108+
| **LangSmith App Attribute** | **Identity Provider Attribute** | **Matching Precedence** |
109+
| ------------------------------ | ----------------------------------------------------- | ----------------------- |
110+
| `userName`<sup>1</sup> | email address | |
111+
| `active` | `!deactivated` | |
112+
| `emails[type eq "work"].value` | email address<sup>2</sup> | |
113+
| `name.formatted` | `displayName` OR `givenName + familyName`<sup>3</sup> | |
114+
| `givenName` | `givenName` | |
115+
| `familyName` | `familyName` | |
116+
| `externalId` | `sub`<sup>4</sup> | 1 |
117+
118+
1. `userName` is not required by LangSmith
119+
1. Email address is required
120+
1. Use the computed expression if your `displayName` does not match the format of `Firstname Lastname`
121+
1. To avoid inconsistency, this should match the SAML `NameID` assertion (in cloud) and the `sub` OAuth2.0 claim (in self-hosted).
122+
123+
#### Group Attributes
87124

88-
## Set up SCIM for your organization
125+
| **LangSmith App Attribute** | **Identity Provider Attribute** | **Matching Precedence** |
126+
| --------------------------- | ------------------------------- | ----------------------- |
127+
| `displayName` | `displayName`<sup>1</sup> | 1 |
128+
| `externalId` | `objectId` | |
129+
| `members` | `members` | |
130+
131+
1. Groups must follow the naming convention described in the [Group Naming Convention](#group-naming-convention) section.
132+
If your company has a group naming policy, you should instead map from the `description` identity provider attribute and
133+
set the description based on the [Group Naming Convention](#group-naming-convention) section.
134+
135+
## Configuration Steps
89136

90137
### Step 1: Configure SAML SSO (Cloud only)
91138

92-
If you're using LangSmith Cloud, ensure [SAML SSO](./set_up_saml_sso.mdx) is configured for your organization.
139+
There are two scenarios for [SAML SSO](./set_up_saml_sso.mdx) configuration:
140+
141+
1. If SAML SSO is already configured for your organization, you should skip the steps to initially add the application ([Add application from Okta Integration Network](#add-application-okta-oin) or [Create a new Entra ID application integration](./set_up_saml_sso#create-application-entra-id)), as you already have an application configured and just need to enable provisioning.
142+
1. If you are configuring SAML SSO for the first time alongside SCIM, first follow the instructions to [set up SAML SSO](./set_up_saml_sso.mdx), _then_ follow the instructions here to enable SCIM.
93143

94144
#### NameID Format
95145

@@ -122,6 +172,10 @@ curl -X PATCH $LANGCHAIN_ENDPOINT/orgs/current/info \
122172

123173
### Step 3: Generate SCIM Bearer Token
124174

175+
:::note
176+
In self-hosted environments, the full URL below may look like `https://langsmith.internal.corp.dev/api/v1/platform/orgs/current/scim/tokens` (without subdomain, note the `/api/v1` path prefix) or `https://langsmith.internal.corp.dev/subdomain/api/v1/platform/orgs/current/scim/tokens` (with subdomain) - see the [ingress docs](../../../self_hosting/configuration/ingress.mdx) for more details.
177+
:::
178+
125179
Generate a SCIM Bearer Token for your organization. This token will be used by your IdP to authenticate SCIM API requests.
126180
Ensure env vars are set appropriately, for example:
127181

@@ -143,9 +197,9 @@ These additional endpoints are present:
143197

144198
### Step 4: Configure your Identity Provider
145199

146-
Follow the IdP-specific instructions below to configure SCIM integration.
147-
148-
## Identity Provider (IdP) Setup
200+
:::note
201+
If you use Azure Entra ID (formerly Azure AD) or Okta, there are specific instructions below for identity provider setup ([Azure Entra ID](#azure-entra-id), [Okta](#okta)). The requirements and steps above are applicable for all identity providers.
202+
:::
149203

150204
### Azure Entra ID
151205

@@ -196,11 +250,13 @@ Set `Target Object Actions` to `Create` and `Update` only (start with `Delete` d
196250

197251
| **LangSmith App Attribute** | **Microsoft Entra ID Attribute** | **Matching Precedence** |
198252
| --------------------------- | -------------------------------- | ----------------------- |
199-
| `displayName` | `displayname`<sup>1</sup> | 1 |
253+
| `displayName` | `displayName`<sup>1</sup> | 1 |
200254
| `externalId` | `objectId` | |
201255
| `members` | `members` | |
202256

203-
1. Groups must follow the naming convention described in the [Azure Group Naming Convention](#group-naming-convention) section
257+
1. Groups must follow the naming convention described in the [Group Naming Convention](#group-naming-convention) section.
258+
If your company has a group naming policy, you should instead map from the `description` Microsoft Entra ID Attribute and
259+
set the description based on the [Group Naming Convention](#group-naming-convention) section.
204260

205261
**Step 4: Assign Users and Groups**
206262

@@ -216,13 +272,63 @@ Set `Target Object Actions` to `Create` and `Update` only (start with `Delete` d
216272

217273
### Okta
218274

219-
Support for Okta is not yet released. If you are interested in using Okta with SCIM, please let us know at [[email protected]](mailto:[email protected]).
275+
:::note
276+
You must use the [Okta Lifecycle Management](https://www.okta.com/products/lifecycle-management/) product. This product tier is required to use SCIM on Okta.
277+
:::
278+
279+
<span id="add-application-okta-oin">
280+
<b>Step 1: Add application from Okta Integration Network</b>
281+
</span>
282+
283+
:::note
284+
If you have already configured SSO login via SAML (cloud) or OAuth2.0 with OIDC (self-hosted), you may skip this step.
285+
:::
286+
287+
See [SAML SSO setup](./set_up_saml_sso#okta) for cloud or [OAuth2.0 setup](../../../self_hosting/configuration/sso#identity-provider-setup-okta) for self-hosted.
288+
289+
**Step 2: Configure API Integration**
290+
291+
1. In the Provisioning tab, select Configure API integration.
292+
1. Select Enable API integration.
293+
1. For Base URL (if present):
294+
295+
- US: `https://api.smith.langchain.com/scim/v2`
296+
- EU: `https://eu.api.smith.langchain.com/scim/v2`
297+
- Self-hosted: `<langsmith_url>/scim/v2` (note there is no `/api/v1` path prefix) or if subdomain is configured `<langsmith_url>/subdomain/scim/v2`
298+
299+
4. For API Token, paste the SCIM token you [generated above](#step-3-generate-scim-bearer-token)
300+
1. Keep `Import Groups` checked.
301+
1. To verify the configuration, select Test API Credentials.
302+
1. Select Save.
303+
1. After saving the API integration details, new settings tabs appear on the left. Select `To App`.
304+
1. Select Edit.
305+
1. Select the Enable checkbox for Create Users, Update Users, and Deactivate Users.
306+
1. Select Save.
307+
1. Assign users and/or groups in the Assignments tab. Assigned users are created and managed in your LangSmith group.
308+
309+
**Step 3: Configure User Provisioning Settings**
310+
311+
1. Configure provisioning: under `Provisioning > To App > Provisioning to App`, click `Edit` then
312+
check `Create Users`, `Update User Attributes`, and `Deactivate Users`
313+
1. Under `<application_name> Attribute Mappings`, set the user attribute mappings as shown below, and delete the rest:
314+
315+
![SCIM Okta User Attributes Mapping](./static/scim_okta_user_attributes.png)
316+
317+
**Step 4: Push Groups**
318+
319+
:::note
320+
Okta does not support group attributes besides the group name itself, so group name _must_ follow the naming convention described in the [Group Naming Convention](#group-naming-convention) section.
321+
:::
322+
323+
Follow Okta's instructions [here](https://help.okta.com/en-us/content/topics/users-groups-profiles/usgp-enable-group-push.htm) to configure groups to push by name or by rule.
220324

221325
### Other Identity Providers
222326

223327
Other identity providers have not been tested but may function depending on their SCIM implementation.
224328

225-
## Support and troubleshooting
329+
## Troubleshooting and Tips
330+
331+
### Support
226332

227333
If you have issues setting up SCIM, please reach out to [[email protected]](mailto:[email protected]).
228334

@@ -247,4 +353,8 @@ The user will be deprovisioned from your LangSmith organization according to you
247353

248354
#### _Can I use custom group names?_
249355

250-
No, groups must follow the specific naming convention described in the [Group Naming Convention](#group-naming-convention) section to properly map to LangSmith roles and workspaces.
356+
Yes. If your identity provider supports syncing alternate fields to the `displayName` group attribute, you may use an alternate attribute (like `description`) as the `displayName` in LangSmith and retain full customizability of the identity provider group name. Otherwise, groups must follow the specific naming convention described in the [Group Naming Convention](#group-naming-convention) section to properly map to LangSmith roles and workspaces.
357+
358+
#### _Why is my Okta integration not working?_
359+
360+
See Okta's troubleshooting guide here: https://help.okta.com/en-us/content/topics/users-groups-profiles/usgp-group-push-troubleshoot.htm.
194 KB
Loading

0 commit comments

Comments
 (0)