[英]pass pem file,certificate and user to authenticate
I am trying to authenticate with chef api. 我正在尝试通过厨师api进行身份验证。 To authenticate with chef api i need to pass in pem file, user and certificate.
要使用Chef api进行身份验证,我需要传入pem文件,用户和证书。 How can i pass that using requests module.
我如何使用请求模块传递它。
Below is what i am trying 以下是我正在尝试的
r = requests.get('https://example.com', cert=(cert_file,ca_file), auth=('user') )
I went through these documents https://2.python-requests.org//en/latest/user/advanced/#ssl-cert-verification 我浏览了这些文档https://2.python-requests.org//en/latest/user/advanced/#ssl-cert-verification
I know pychef is available to interact with chef server , but i want to do it through requests module . 我知道pychef可用于与Chef服务器进行交互,但是我想通过请求模块来实现。 Can this be achieved ?
能做到吗?
尝试使用coderanger的pychef,或者您可以从Chef-api中获得启发
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.