How can I add certificates (cert) to the requests.Session object in plain text?
I am now storing my certificatkey in AWS with Secrets Manager. The problem is that now I do not want to have a file on the server (I am using lambdas), now I want to load the certificate when I read it from AWS Secret Manager.
from requests import Session
from zeep import Client
from zeep.transports import Transport
cert = "I retrieve certificate from AWS Secrets manager"
key = "I retrieve key from AWS Secrets Manager"
session = Session()
session.cert = (cert, key)
transport = Transport(session=session)
client = Client(
'http://my.own.sslhost.local/service?WSDL',
transport=transport)
If I load it that way I get an error because it is not a path. I have tried several ways, but have not been able to do it. Does anyone know how to do it without specifying a path to a file? Or it is simply not possible.