如何使用 python suds 客户端进行 kerberos 身份验证
我有一个基于 Windows 的 Web 服务,可以进行证书吊销。它提供了一个 WSDL 文件,我希望 python suds
包使用该文件来撤销证书。
该服务通过 Kerberos/GSSAPI 进行保护,因此有一个密钥表文件来提供凭据。如何告诉 suds
客户端使用 keytab 文件向 Web 服务提供凭据?
换句话说,我想做这样的事情:
from suds.client import Client
url = 'https://example.com/CertificateManagement/IssuedCertificateService.svc?wsdl'
t = HttpAuthKerberosKeytab('/path/to/file.keytab')
client = Client(url, transport=t)
print client
I have a Windows-based web service that does certificate revocation. It supplies a WSDL file that I want the python suds
package to use to allow me to revoke certificates.
The service is protected via Kerberos/GSSAPI, so there is a keytab file in order to provide the credentials. How do I tell the suds
client to use the keytab file to provide the credentials to the web service?
In other words, I want to do something like this:
from suds.client import Client
url = 'https://example.com/CertificateManagement/IssuedCertificateService.svc?wsdl'
t = HttpAuthKerberosKeytab('/path/to/file.keytab')
client = Client(url, transport=t)
print client
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要 PyKerberos。如果你的客户端没有,你必须修补它。否则,您的 Web 服务将不会获得 SPNEGO/Kerberos 支持。
You will require PyKerberos. If your client does not, you have to patch it. Otherwise there will be not SPNEGO/Kerberos support for your web services.