使用 Kerberos 身份验证和 Kerberos 委派
要验证用户对 MATLAB® Production Server™ 实例的访问,您需要配置 Kerberos。要将客户端的凭据委托给下一跳 Web 服务器或受 Kerberos 保护的数据库服务器,您需要配置 Kerberos 委托。配置 Kerberos 和 Kerberos 委派需要域管理员特权。
您可以在具有 Windows Server® 密钥分发中心 (KDC) 的 Windows® 操作系统上运行的 MATLAB Production Server 实例中使用 Kerberos 身份验证和 Kerberos 委派。
您只能对在 Linux® 操作系统上运行的 MATLAB Production Server 实例使用 Kerberos 身份验证。对于 Linux 服务器实例,您可以使用 Windows KDC 或基于 Linux 的 MIT Kerberos 5 KDC。
要配置 Kerberos 身份验证和 Kerberos 委派,请咨询您的 IT 或系统管理员。
Windows 系统上的 Kerberos 身份验证和 Kerberos 委派设置
配置 Kerberos 身份验证
为 MATLAB Production Server 设置服务帐号,并为 MATLAB Production Server 服务实例注册服务主体名称。
在 MATLAB Production Server 配置文件(
main_config)中启用 Kerberos。有关详细信息,请参阅 http-authentication-method。
配置 Kerberos 委派
为 MATLAB Production Server 设置服务帐号,并为 MATLAB Production Server 服务实例注册服务主体名称。
为服务帐户配置无需协议转换的约束委派。
为 MATLAB Production Server 服务账户配置本地安全特权。
在 MATLAB Production Server 配置文件(
main_config)中启用 Kerberos 身份验证和 Kerberos 委派。有关详细信息,请参阅http-authentication-method和client-credential-delegation。
仅可部署存档(CTF 文件)中的以下 MATLAB 函数支持使用 Kerberos 委派:
webreadwebwrite使用 HTTP 从 MATLAB 调用 Web 服务 (MATLAB) 函数
Database Toolbox™ 函数(需要 ODBC 驱动)
注意
如果在使用 Database Toolbox 函数的 MATLAB Production Server 实例上使用 Kerberos 委派时使用持久数据库连接,则打开连接的用户的凭据将用于每个后续数据库请求,无论发出请求的用户是谁。
可部署存档(CTF 文件)中的所有其他函数均使用 MATLAB Production Server 实例的凭据执行。
支持的环境
| 选项 | 需求 |
|---|---|
操作系统 | Windows Server |
密钥分发中心 | Windows Server 2003 或更高版本 |
Client |
|
Kerberos 委派 | 无协议转换的约束委派 |
MATLAB Runtime | MATLAB Runtime R2019b 或更高版本 |
可部署存档打包 | MATLAB Compiler SDK™ R2019b 或更高版本 |
数据库服务器 | Microsoft® SQL Server® 2012 或更高版本 |
数据库驱动 | Microsoft SQL Server ODBC 驱动版本 11 或更高版本 |
在 Linux 系统上设置 Kerberos
为 MATLAB Production Server 设置服务帐号,并为 MATLAB Production Server 服务实例注册服务主体名称。
为 MATLAB Production Server 服务票证主体创建一个密钥表。有关更多信息,请参阅 MIT Kerberos 文档中的 keytab、kvno 和 ktutil。
为 MATLAB Production Server 服务票证主体创建凭据缓存。有关更多信息,请参阅 MIT Kerberos 文档中的凭据缓存和 kinit。
设置环境变量
KRB5_KTNAME以指向 keytab 位置。在 MATLAB Production Server 配置文件(
main_config)中启用 Kerberos。有关详细信息,请参阅 http-authentication-method。
支持的环境
| 选项 | 需求 |
|---|---|
操作系统 | 对于受支持的 Linux 发行版,请参阅 MATLAB 的系统要求。 |
密钥分发中心 |
|
Client |
|