pysaml2 icon indicating copy to clipboard operation
pysaml2 copied to clipboard

How to provide key_file content instead of key_file path

Open tyctor opened this issue 4 years ago • 4 comments

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

tyctor avatar Apr 23 '21 11:04 tyctor

pysaml2 does not support this at the moment, but maybe it is an idea to keep around for the future.

c00kiemon5ter avatar May 15 '21 20:05 c00kiemon5ter

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

peppelinux avatar May 15 '21 20:05 peppelinux

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

tyctor avatar May 17 '21 11:05 tyctor

https://github.com/IdentityPython/pysaml2/issues/404

omidraha avatar Jun 29 '22 12:06 omidraha