Skip to content

Commit d658b25

Browse files
committed
feat: improved docs with additional ways to handle certificates files dynamically - fix: #264
1 parent 6dad116 commit d658b25

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/source/contents/setup.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,3 +617,14 @@ encryption/decryption support please configure another set of ``key_file`` and
617617
SAML2 certificate creation example::
618618

619619
openssl req -nodes -new -x509 -newkey rsa:2048 -days 3650 -keyout private.key -out public.cert
620+
621+
622+
PySAML2 certificates are files, in the form of strings that contains a filesystem path.
623+
What about configuring the certificates in a different way, in case we are using a container based deploy?
624+
625+
- You could supply the cert & key as environment variables (base64 encoded) then create the files
626+
when the container starts, either in an entry point shell script or in your settings.py file.
627+
628+
- Using `Python Tempfile <https://docs.python.org/3/library/tempfile.html>`_
629+
In the settings create two temp files, then write the content configured in environment variables in them, then use tmpfile.name as
630+
key/cert values in pysaml2 configuration.

0 commit comments

Comments
 (0)