

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# 身份验证方法
<a name="odbc20-authentication-ssl"></a>

为了防止数据遭到未经授权的访问，Amazon Redshift 数据存储要求所有连接都使用用户凭据进行身份验证。

下表说明了可用于连接到 Amazon Redshift ODBC 驱动程序版本 2.x 的每种身份验证方法的必需和可选连接选项：


| 身份验证方法 | 必需 | 可选 | 
| --- | --- | --- | 
|  标准  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |   | 
|  IAM 配置文件  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  IAM 凭证  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  AD FS  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  Azure AD  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  JWT  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  | 
|  Okta  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  Ping Federate  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  浏览器 Azure AD  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  浏览器 SAML  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  身份验证配置文件  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |   | 
|  浏览器 Azure AD OAUTH2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)   如果没有单独设置 **ClusterID** 和**区域**，则必须在**主机**中设置它们。   | 
|  AWS IAM Identity Center  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/mgmt/odbc20-authentication-ssl.html)  | 

## 使用外部凭证服务
<a name="odbc20-authentication-external"></a>

除了对 AD FS、Azure AD 和 Okta 的内置支持外，Amazon Redshift ODBC 驱动程序的 Windows 版本还提供了对其他凭证服务的支持。该驱动程序可以使用您选择的任何基于 SAML 的凭证提供程序插件对连接进行身份验证。

要在 Windows 上配置外部凭证服务，请执行以下操作：

1. 创建一个 IAM 配置文件，根据需要指定凭证提供程序插件和其他身份验证参数。配置文件必须采用 ASCII 编码，并且必须包含以下键值对，其中 `PluginPath` 是插件应用程序的完整路径：

   ```
   plugin_name = PluginPath
   ```

   例如：

   ```
   plugin_name = C:\Users\kjson\myapp\CredServiceApp.exe 
   ```

   有关如何创建配置文件的信息，请参阅《Amazon Redshift 集群管理指南》中的[使用配置文件](https://docs.aws.amazon.com/redshift/latest/mgmt/options-for-providing-iam-credentials.html#using-configuration-profile)。

1. 将驱动程序配置为使用此配置文件。驱动程序将检测并使用配置文件中指定的身份验证设置。