> 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).

# Okta

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

## 概览

将 Okta——Okta 的企业身份平台——连接为贵组织的身份提供商。连接后，您的用户可通过单点登录使用其 Okta 凭据登录 Dispel。您可以通过 **OAuth（OIDC）** 或 **SAML**.

本页涵盖 Okta 特定的设置。有关适用于每个提供商的共享行为——用户如何登录、组映射、MFA 以及断开连接——请参见 [身份提供商](/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md).

{% hint style="info" %}
**在哪里找到它。** 以组织管理员身份登录并打开 **设置 → 集成** （或专用的 **设置 → 身份验证** 页面）。Okta 会出现在 **身份与身份验证（IdP / SSO）** 部分。点击 **连接** 卡片上的它开始。
{% endhint %}

## 开始之前

* 您将在……中配置 IdP 侧 **Okta 管理控制台**，因此您需要在那里拥有管理访问权限。
* 选择一种协议—— **OAuth（OIDC）** 或 **SAML**。请参阅 [选择协议](/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 管理控制台中，前往 **Applications → Create App Integration** 并选择 **OIDC — OpenID 连接**.
2. 设置 **登录重定向 URI** 设置为你的 Dispel 地址，后接 `/oauth/login-callback` ——例如 `https://app.dispel.com/oauth/login-callback`。如果不确定，请向您的 Dispel 代表确认您环境中的确切地址。
3. 将应用分配给应有访问权限的用户或组。
4. 从应用的 **常规** 选项卡中，复制 **客户端 ID** 和 **客户端密钥**，并记下您的 Okta 域名/颁发者。

#### 在 Dispel 中

1. 点击 **连接** 在 Okta 卡片上并 **选择身份验证协议 → OAuth**.
2. 填写以下字段：

| 字段          | 来自 Okta 的值                                                 |
| ----------- | ---------------------------------------------------------- |
| **客户端 URL** | 您的 Okta OAuth/OIDC 端点（颁发者），例如 `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. 完成应用创建后，打开其 **登录** 选项卡并收集：
   * **身份提供商单点登录 URL** → Dispel 的 **SSO URL**.
   * **身份提供商颁发者** → Dispel 的 **身份提供商实体 ID**.
   * 该 **X.509 / 签名证书** → Dispel 的 **Base64 签名证书**.
4. 将应用分配给应有访问权限的用户或组。

#### 在 Dispel 中

1. 点击 **连接** 在 Okta 卡片上并 **选择身份验证协议 → SAML**.
2. 复制 **服务提供商（SP）实体 ID** 和 **断言消费者服务 URL** 在表单顶部显示的（使用 **复制 ID** / **复制 URL**）到 Okta 中，如上所述。
3. 填写以下字段：

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

4. 点击 **保存设置**.
5. 点击 **测试连接**。Dispel 会将您重定向到 Okta 进行登录，然后显示它收到的电子邮件和姓名。如果测试失败，请确认这些值与您的 Okta 应用匹配，并且测试用户已被邀请加入您的组织。

## 连接后

* **用户登录** 通过在 Dispel 登录界面输入您的组织标识符并使用 Okta 进行身份验证。请参见 [用户如何登录](/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#how-users-sign-in).
* **将 Okta 组映射到 Dispel 组** 以保持成员资格同步——请参阅 [OIDC 组映射](/documentation/documentation-zh/ji-cheng-yu-guan-li/integrations/oidc-group-mapping.md).
* **MFA** 在 Okta 中强制执行的设置会在登录时生效；Dispel 的电子邮件一次性验证码不适用于 SSO 用户。请参见 [SSO 和多因素身份验证](/documentation/documentation-zh/bao-hu-yu-zhi-li/identity-providers.md#sso-and-multi-factor-authentication).
* **要切换协议或提供商**，请先断开连接。请参阅 [切换或断开提供商](/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、颁发者和证书与您的 Okta 应用的 Sign On 设置一致，确认您已将 Dispel 的 SP 实体 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.
