From dfc7b4b7d938136b7d4639bb335e371981507ef7 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 3 Oct 2023 16:51:23 +0200 Subject: [PATCH] Add a mention of django-filesify for managing cert and key The django-filesidy third party package could be an alternative for managing cert/key on conainer hosted projects. --- docs/source/contents/setup.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/contents/setup.rst b/docs/source/contents/setup.rst index a7fda926..93e991ef 100644 --- a/docs/source/contents/setup.rst +++ b/docs/source/contents/setup.rst @@ -665,6 +665,8 @@ SAML2 certificate creation example:: PySAML2 certificates are files, in the form of strings that contains a filesystem path. What about configuring the certificates in a different way, in case we are using a container based deploy? +- You could try using a third-party package like `django-filesify `_ to create a physical files from a secured database text field where the cert and key are stored. + - You could supply the cert & key as environment variables (base64 encoded) then create the files when the container starts, either in an entry point shell script or in your settings.py file. - Using `Python Tempfile `_ In the settings create two temp files, then write the content configured in environment variables in them, then use tmpfile.name as key/cert values in pysaml2 configuration.