---
schema_version: "1"
id: c82701babafb705c4484475d3e0bd056127bf6e88342e8a5da9ff73afa606990
title: 为 Impala 配置外部 OAuth
collection: tableau
version: next
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/next/zh-cn/server/config_oauth_impala.md
canonical_url: https://help.tableau.com/v0.0/server/zh-cn/config_oauth_impala.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 857b442f6d214adfea9bb249fdce02627a79f8cf698bc83ae51a3bcfff422fbf
description: Configure external OAuth 2.0/OIDC identity federation for Impala in Tableau.
---
[跳转到主要内容](#main-content)

# 为 Impala 配置外部 OAuth

从 Tableau Desktop 和 Tableau Server 的 Tableau 2025.3 以及 Tableau Cloud 的 2026.1 开始，您可以使用 OAuth 2.0/OIDC 将外部身份提供程序的身份联合到 Impala。

根据身份提供程序的不同，配置集成需要执行不同的步骤。这是一个简略概述。

## 在 Impala 上配置 IDP

有关在 Impala 上配置 IdP 的信息，请参见 Cloudera 文档中的[配置 OAuth 身份验证](https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/impala-secure/topics/impala-oauth.html "用于在 Impala 上配置 OAuth 的 Cloudera 文档链接")。

## 配置 IDP

1. 在 IDP 上为 Tableau Desktop 和 Tableau Server 或 Tableau Cloud 创建 OAuth 客户端。Desktop 客户端应启用 [`PKCE`](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce) 并使用 `http://localhost` 重定向。
2. 创建 Tableau OAuth 配置文件。有关如何执行此操作的详细信息，请参见 [GitHub](https://tableau.github.io/connector-plugin-sdk/docs/oauth "GitHub 上的 OAuth 文档") 上的 [OAuth 配置和使用](https://tableau.github.io/connector-plugin-sdk/docs/oauth)，以及[此处](https://github.com/tableau/connector-plugin-sdk/tree/master/samples/components/oauth "GitHub 上的 OAuth 示例。")的示例。我们欢迎提供其他 IDP 的示例。
    
    1. 请务必在 Tableau OAuth 配置 ID 前添加“`custom_`”前缀。
        
        **注意：**OAuth 配置 ID 的最大限制为 36 个字符。长于此长度的 ID 可能不会生成错误，但将不起作用。
    2. 如果您的 IDP 支持动态本地主机端口，则禁用 `OAUTH_CAP_FIXED_PORT_IN_CALLBACK_URL`。如果您的 IDP 不支持此功能，请确保将多个本地主机回调 URL 添加到配置文件和 IDP 上的允许列表中。
3. 在与桌面主机（Tableau Desktop、Tableau Prep Builder、Tableau Bridge）上的每个应用程序关联的 `OAuthConfigs` 文件夹中，以及在将通过站点设置页面使用 OAuth 的每个 Tableau Server 和 Tableau Cloud 站点上，安装新的 Tableau OAuth 配置文件。有关更多详细信息，请参见 [Desktop 上的自定义 OAuth 配置](https://tableau.github.io/connector-plugin-sdk/docs/oauth#site-level-oauth-clients)和[站点级别 OAuth 客户端](https://tableau.github.io/connector-plugin-sdk/docs/oauth#custom-oauth-configs-on-desktop)。

## 连接到 Impala

用户必须选择“使用 OAuth 登录”，然后选择之前安装的“OAuth 提供程序”。

![](/tableau/next/zh-cn/server/zh-cn/Img/impala_oauth_connect.png)