pysaml2 icon indicating copy to clipboard operation
pysaml2 copied to clipboard

Support for in-memory key/cert

Open joshma opened this issue 8 years ago • 5 comments

Currently I see that you can set key_file and cert_file - however, this requires having the data on the filesystem.

In our case, we have the data in memory but it's not convenient to write it to disk. Is it possible to accept a base64-encoded string instead of a filepath?

joshma avatar Apr 04 '17 01:04 joshma

I'd also add these:

https://github.com/IdentityPython/pysaml2/blob/master/src/saml2/sigver.py#L325 https://github.com/IdentityPython/pysaml2/blob/master/src/saml2/sigver.py#L1462

As we know I/O disk is the most time consuming thing in IT infrastructures. As we can see every AuthnRequest, validated with metadata key, creates a temporary pem file. This impact seriously on performances.

Is there any code refactor about this current approach?

peppelinux avatar Jul 02 '19 14:07 peppelinux

https://github.com/IdentityPython/pysaml2/issues/278#issuecomment-182990487

peppelinux avatar Jul 21 '19 14:07 peppelinux

I would like to load all certs, configs and metadata files from memory or DB:

omidraha avatar Jun 29 '22 12:06 omidraha

If you are on linux, a tmpfs or /dev/shm might be what you want for certificates. As for metadata, they can already be passed as a string using the inline type.

mheuwes avatar Jun 29 '22 13:06 mheuwes

This might be old, but I would like to add a use case for this: Say your application is packaged as a full Container, but the container shall not include secrets (at least not without encryption). As pysaml2 only supports reading from file, the key must first be stored inside the container. To improve security, allowing writes during runtime of a container is kinda discouraged but currently required for such scenarios.

Would such a change be accepted? If yes, where could I start to provide a PR?

prauscher avatar Apr 23 '24 10:04 prauscher