【发布时间】:2017-11-26 17:05:57
【问题描述】:
我正在尝试在 Kerberos 安全性下连接到 Livy REST 服务。在 Linux CentoS 上,curl 与 negotiate 可以正常工作,在收到 Kerberos kinit 票证后,连接通过
curl --negotiate -u : http://service_link
我面临的问题是尝试在远程 Windows 桌面上执行相同的操作。我正在使用 MIT Kerberos for Windows,它能够成功地完成kinit。但是,curl 似乎正在使用 NTLM SSL 票证而不是 Kerberos 进行协商,这会导致以下错误:
AuthenticationFilter: Authentication exception: org.apache.hadoop.security.authentication.client.AuthenticationException
我试过使用official curl release for windows,具有这些功能(curl --version):
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP HTTP2 HTTPS-proxy
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SPNEGO SSL SSPI libz
这两者在协商时都使用 NTLM SLL。
问题:有没有办法强制使用 Kerberos 而不是 NTLM?是否可以调试 Negotiator 以查看它是否(以及在哪里)正在寻找 Kerberos(并且可能没有看到)票?
关于 Kerberos,它似乎将 keytabs 存储在它的 api 上,所以我将 KRB5CCNAME 环境变量设置为 API:Initial default ccache; klist 可以看到票,但是,也许curl 需要额外的说明?
还有——有没有curl 的替代方法来实现与 Kerberos 安全性的这种连接?
【问题讨论】:
标签: rest hadoop curl kerberos livy