aboutsummaryrefslogtreecommitdiff
path: root/app/secrets.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-01-16 17:37:34 +0100
committerAlex Auvolat <alex@adnab.me>2021-01-16 17:37:34 +0100
commitd4d0b100ad39bf7ae560c2f714b75fdcf47e9a87 (patch)
tree6ca1be19d3b15c61cdb3fe4de448c20fc12b769f /app/secrets.py
parentc74dc92febd1841c8ea5ff31caab0f941d57527d (diff)
downloadinfrastructure-d4d0b100ad39bf7ae560c2f714b75fdcf47e9a87.tar.gz
infrastructure-d4d0b100ad39bf7ae560c2f714b75fdcf47e9a87.zip
Document secrets and add stub utility to manage them
Diffstat (limited to 'app/secrets.py')
-rw-r--r--app/secrets.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/secrets.py b/app/secrets.py
new file mode 100644
index 0000000..00f6016
--- /dev/null
+++ b/app/secrets.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+
+"""
+TODO: this will be a utility to handle secrets in the Consul database
+for the various components of the Deuxfleurs infrastructure
+
+Functionnalities:
+- check that secrets are correctly configured
+- help user fill in secrets
+- create LDAP service users and fill in corresponding secrets
+- maybe one day: manage SSL certificates and keys
+
+It uses files placed in <module_name>/secrets/* to know what secrets
+it should handle. These secret files contain directives for what to do
+about these secrets.
+
+Example directives:
+
+USER <description>
+(a secret that must be filled in by the user)
+
+USER_LONG <description>
+(the same, indicates that the secret fits on several lines)
+
+CONST <constant value>
+(the secret has a constant value set here)
+
+CONST_LONG
+<constant value, several lines>
+(same)
+
+SERVICE_DN <service name> <service description>
+(the LDAP DN of a service user)
+
+SERVICE_PASSWORD <service name>
+(the LDAP password for the corresponding service user)
+
+SSL_CERT <cert name> <list of domains>
+(a SSL domain for the given domains)
+
+SSL_KEY <cert name>
+(the SSL key going with corresponding certificate)
+"""
+