pysaml2
pysaml2 copied to clipboard
How to provide key_file content instead of key_file path
Hi
is there posibility to set key_file and cert_file content in configuration instead of path?
my application is runing inside docker, so this files are not stored on local filesystem,
but i can set it from outside via variable in os.environ
probably i could do some workaround, and save content into file temp file and set this file,
before saml2 config is parsed
but i am asking here, if there is any natural way how to set content of key instead of path to key file
thanks for any reply
pysaml2 does not support this at the moment, but maybe it is an idea to keep around for the future.
At the end of the section dedicated to certificates, on djangosaml2 docs, we have described two workarouds for this
https://djangosaml2.readthedocs.io/contents/setup.html#certificates
Thanks also to @tyctor for this
there is already key argument in current sigver.py sign_statement method
https://github.com/IdentityPython/pysaml2/blob/8f3b407999b928050c8499dbbaca522b9a50573f/src/saml2/sigver.py#L1699
but probably it is not used in conjuction with config yet
https://github.com/IdentityPython/pysaml2/issues/404