> For the complete documentation index, see [llms.txt](https://docs.dispel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers/okta.md). Agents can also search and read this documentation through its [MCP server](https://docs.dispel.com/~gitbook/mcp).

# Okta

使用 Okta 作为你的身份提供方，使用户通过 OAuth（OIDC）或 SAML 使用其 Okta 凭据登录 Dispel。

## 概述

将 Okta（Okta 的企业身份平台）连接为组织的身份提供方。连接后，用户即可通过单点登录，使用 Okta 凭据登录 Dispel。你可以通过以下方式连接 Okta： **OAuth (OIDC)** 或 **SAML**.

本页介绍 Okta 特定的设置。有关适用于所有提供方的通用行为——包括用户登录、组映射、多因素身份验证 (MFA) 和断开连接——请参阅 [身份提供方](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md).

{% hint style="info" %}
**查找位置。** 以组织管理员身份登录，然后打开 **设置 → 集成** （或专用的 **设置 → 身份验证** 页面）。Okta 位于 **身份与身份验证（IdP / SSO）** 部分。点击其卡片上的 **连接** 即可开始。
{% endhint %}

## 开始之前

* 你需要在 **Okta 管理控制台**中配置 IdP，因此需要拥有该控制台的管理员访问权限。
* 选择一种协议： **OAuth (OIDC)** 或 **SAML**。请参阅 [选择协议](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#choosing-a-protocol).
* 请确保要通过 Okta 登录的用户已在 Dispel 中 **受邀加入你的组织** 。SSO 可验证用户身份，但不会自动授予访问权限。

{% hint style="warning" %}
**一次只能连接一个提供方。** 如果你的组织已连接到其他身份提供方，请先断开连接，再连接 Okta。
{% endhint %}

## 通过 OAuth (OIDC) 连接

#### 在 Okta 中

1. 在 Okta 管理控制台中，前往 **应用程序 → 创建应用集成** 并选择 **OIDC — OpenID Connect**.
2. 将 **登录重定向 URI** 设置为你的 Dispel 地址，并在其后添加 `/oauth/login-callback` ，例如 `https://app.dispel.com/oauth/login-callback`。如果不确定，请向 Dispel 代表确认适用于你所在环境的准确地址。
3. 将此应用分配给需要访问权限的用户或群组。
4. 在应用的 **常规** 选项卡中，复制 **客户端 ID** 和 **客户端密钥**，并记下你的 Okta 域名 / issuer。

#### 在 Dispel 中

1. 点击 Okta 卡片上的 **连接** ，然后 **选择 Authentication Protocol → OAuth**.
2. 填写以下字段：

| 字段          | 来自 Okta 的值                                                    |
| ----------- | ------------------------------------------------------------- |
| **客户端 URL** | 你的 Okta OAuth/OIDC 端点（issuer），例如 `https://your-org.okta.com`. |
| **客户端 ID**  | 应用程序的 **客户端 ID**.                                             |
| **客户端密钥**   | 应用的 **客户端密钥**.                                                |
| **组织标识符**   | 您自行选择的唯一标识符；用户在登录屏幕上输入该标识符。                                   |

3. 点击 **保存设置**.

## 使用 SAML 连接

#### 在 Okta 中

1. 在 Okta 管理控制台中，前往 **Applications → Create App Integration** 并选择 **SAML 2.0**.
2. 在 SAML 设置中，粘贴 Dispel 在其 SAML 表单顶部显示的值：
   * **单点登录 URL / 接收方 / 目标** ← Dispel 的 **断言使用者服务 URL**.
   * **受众 URI（SP 实体 ID）** ← Dispel 的 **服务提供商（SP）实体 ID**.
3. 完成应用创建，然后打开其 **Sign On** 选项卡并收集以下信息：
   * **身份提供商单点登录 URL** → Dispel 的 **SSO URL**.
   * **身份提供商发行者** → Dispel 的 **身份提供商实体 ID**.
   * 该 **X.509 / 签名证书** → Dispel 的 **Base64 签名证书**.
4. 将此应用分配给需要访问权限的用户或群组。

#### 在 Dispel 中

1. 点击 **Connect** （位于 Okta 卡片上），然后 **选择 Authentication Protocol → SAML**.
2. 复制表单顶部显示的 **服务提供商（SP）实体 ID** 和 **断言使用者服务 URL** （使用 **Copy ID** / **Copy URL**），并按上述方法粘贴到 Okta 中。
3. 填写以下字段：

| 字段              | 来自 Okta 的值                                 |
| --------------- | ------------------------------------------ |
| **SSO URL**     | 该 **身份提供商单点登录 URL**.                       |
| **身份提供商实体 ID**  | 该 **身份提供商发行者**.                            |
| **Base64 签名证书** | Okta 签名证书。粘贴证书，或使用 **Upload Certificate**. |
| **组织标识符**       | 您自行选择的唯一标识符；用户在登录屏幕上输入该标识符。                |

4. 点击 **保存设置**.
5. 点击 **Test connection**. Dispel 会将你重定向到 Okta 登录，然后显示收到的电子邮件地址和姓名。如果测试失败，请确认这些值与 Okta 应用中的设置一致，并且已邀请测试用户加入你的组织。

## 连接后

* **用户登录时** 在 Dispel 登录页面输入你的组织标识符，然后通过 Okta 进行身份验证。请参阅 [用户如何登录](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#how-users-sign-in).
* **将 Okta 组映射到 Dispel 组** 以保持成员资格同步 — 请参阅 [组映射](https://docs.dispel.com/documentation/documentation-zh/ji-cheng-yu-guan-li/integrations/group-mapping.md).
* **多重身份验证 (MFA)** 在 Okta 中强制执行的多重身份验证会在登录时生效；Dispel 的电子邮件一次性验证码不适用于 SSO 用户。请参阅 [SSO 和多重身份验证](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#sso-and-multi-factor-authentication).
* **如需切换协议或提供商**，请先断开连接。请参阅 [切换或断开提供商](https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#switching-or-disconnecting-a-provider).

## 常见问题

<details>

<summary>Okta 应使用哪种协议？</summary>

两种都可以。选择与您在 Okta 中创建的应用相匹配的协议 — OAuth 使用 OIDC 应用集成，SAML 使用 SAML 2.0 应用集成。

</details>

<details>

<summary>我需要将用户分配到 Okta 应用吗？</summary>

需要。只有分配到 Okta 应用的用户（或组）才能通过该应用进行身份验证。他们还必须受邀加入您的 Dispel 组织。

</details>

<details>

<summary>SAML 连接测试失败了。应该检查哪些内容？</summary>

请确认 SSO URL、Issuer 和证书与 Okta 应用的“登录”设置相匹配；已将 Dispel 的 SP Entity ID 和 ACS URL 粘贴到 Okta 的 SAML 设置中；并且测试用户已分配到 Okta 应用且受邀加入您的 Dispel 组织。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dispel.com/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers/okta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
