From 7fd81f347006ca6ebaf6f0cf149a4d8c1f8086b0 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 19:52:28 +0100 Subject: WIP new secretmgr --- cluster/staging/app/secretmgr | 1 - 1 file changed, 1 deletion(-) delete mode 120000 cluster/staging/app/secretmgr (limited to 'cluster') diff --git a/cluster/staging/app/secretmgr b/cluster/staging/app/secretmgr deleted file mode 120000 index 6aff4ad..0000000 --- a/cluster/staging/app/secretmgr +++ /dev/null @@ -1 +0,0 @@ -../../../secretmgr/secretmgr \ No newline at end of file -- cgit v1.2.3 From 8d0a7a806da952adccca51b0a806a4c28732ea90 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 21:03:16 +0100 Subject: New secretmgr --- cluster/staging/app/convertsecrets | 1 + cluster/staging/app/core/secrets.toml | 4 ++ cluster/staging/app/core/secrets/d53/gandi_api_key | 1 - cluster/staging/app/directory/secrets.toml | 48 ++++++++++++++++++++++ .../secrets/directory/guichet/mail_domain | 1 - .../directory/secrets/directory/guichet/mail_from | 1 - .../secrets/directory/guichet/s3_access_key | 1 - .../directory/secrets/directory/guichet/s3_bucket | 1 - .../secrets/directory/guichet/s3_endpoint | 1 - .../directory/secrets/directory/guichet/s3_region | 1 - .../secrets/directory/guichet/s3_secret_key | 1 - .../directory/secrets/directory/guichet/smtp_pass | 1 - .../secrets/directory/guichet/smtp_server | 1 - .../directory/secrets/directory/guichet/smtp_user | 1 - .../secrets/directory/guichet/web_hostname | 1 - .../app/directory/secrets/directory/ldap_base_dn | 1 - cluster/staging/app/dummy/secrets.toml | 36 ++++++++++++++++ cluster/staging/app/garage/secrets.toml | 15 +++++++ .../app/garage/secrets/garage-staging/admin_token | 1 - .../garage/secrets/garage-staging/metrics_token | 1 - .../app/garage/secrets/garage-staging/rpc_secret | 1 - cluster/staging/app/im/secrets.toml | 27 ++++++++++++ cluster/staging/app/im/secrets/synapse/form_secret | 1 - .../app/im/secrets/synapse/macaroon_secret_key | 1 - .../im/secrets/synapse/registration_shared_secret | 1 - .../staging/app/im/secrets/synapse/s3_access_key | 1 - .../staging/app/im/secrets/synapse/s3_secret_key | 1 - cluster/staging/app/im/secrets/synapse/signing_key | 1 - cluster/staging/app/telemetry/secrets.toml | 13 ++++++ .../secrets/telemetry/grafana/admin_password | 1 - .../secrets/telemetry/grafana/s3_access_key | 1 - .../secrets/telemetry/grafana/s3_secret_key | 1 - cluster/staging/secretmgr.toml | 9 ++++ 33 files changed, 153 insertions(+), 25 deletions(-) create mode 120000 cluster/staging/app/convertsecrets create mode 100644 cluster/staging/app/core/secrets.toml delete mode 100644 cluster/staging/app/core/secrets/d53/gandi_api_key create mode 100644 cluster/staging/app/directory/secrets.toml delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/mail_domain delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/mail_from delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/s3_access_key delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/s3_bucket delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/s3_endpoint delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/s3_region delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/s3_secret_key delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/smtp_pass delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/smtp_server delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/smtp_user delete mode 100644 cluster/staging/app/directory/secrets/directory/guichet/web_hostname delete mode 100644 cluster/staging/app/directory/secrets/directory/ldap_base_dn create mode 100644 cluster/staging/app/dummy/secrets.toml create mode 100644 cluster/staging/app/garage/secrets.toml delete mode 100644 cluster/staging/app/garage/secrets/garage-staging/admin_token delete mode 100644 cluster/staging/app/garage/secrets/garage-staging/metrics_token delete mode 100644 cluster/staging/app/garage/secrets/garage-staging/rpc_secret create mode 100644 cluster/staging/app/im/secrets.toml delete mode 100644 cluster/staging/app/im/secrets/synapse/form_secret delete mode 100644 cluster/staging/app/im/secrets/synapse/macaroon_secret_key delete mode 100644 cluster/staging/app/im/secrets/synapse/registration_shared_secret delete mode 100644 cluster/staging/app/im/secrets/synapse/s3_access_key delete mode 100644 cluster/staging/app/im/secrets/synapse/s3_secret_key delete mode 100644 cluster/staging/app/im/secrets/synapse/signing_key create mode 100644 cluster/staging/app/telemetry/secrets.toml delete mode 100644 cluster/staging/app/telemetry/secrets/telemetry/grafana/admin_password delete mode 100644 cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_access_key delete mode 100644 cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_secret_key create mode 100644 cluster/staging/secretmgr.toml (limited to 'cluster') diff --git a/cluster/staging/app/convertsecrets b/cluster/staging/app/convertsecrets new file mode 120000 index 0000000..3e30b0f --- /dev/null +++ b/cluster/staging/app/convertsecrets @@ -0,0 +1 @@ +../../../secretmgr/convertsecrets \ No newline at end of file diff --git a/cluster/staging/app/core/secrets.toml b/cluster/staging/app/core/secrets.toml new file mode 100644 index 0000000..8da8561 --- /dev/null +++ b/cluster/staging/app/core/secrets.toml @@ -0,0 +1,4 @@ +[secrets."d53/gandi_api_key"] +type = 'user' +description = 'Gandi API key' + diff --git a/cluster/staging/app/core/secrets/d53/gandi_api_key b/cluster/staging/app/core/secrets/d53/gandi_api_key deleted file mode 100644 index b3936c9..0000000 --- a/cluster/staging/app/core/secrets/d53/gandi_api_key +++ /dev/null @@ -1 +0,0 @@ -USER Gandi API key diff --git a/cluster/staging/app/directory/secrets.toml b/cluster/staging/app/directory/secrets.toml new file mode 100644 index 0000000..0ebd77f --- /dev/null +++ b/cluster/staging/app/directory/secrets.toml @@ -0,0 +1,48 @@ +[secrets."directory/ldap_base_dn"] +type = 'user' +description = 'LDAP base DN for everything (e.g. dc=example,dc=com)' + +[secrets."directory/guichet/smtp_user"] +type = 'user' +description = 'SMTP username' + +[secrets."directory/guichet/s3_access_key"] +type = 'user' +description = 'Garage access key for Guichet profile pictures' + +[secrets."directory/guichet/s3_endpoint"] +type = 'user' +description = 'S3 endpoint URL' + +[secrets."directory/guichet/s3_region"] +type = 'user' +description = 'S3 region' + +[secrets."directory/guichet/smtp_pass"] +type = 'user' +description = 'SMTP password' + +[secrets."directory/guichet/web_hostname"] +type = 'user' +description = 'Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com)' + +[secrets."directory/guichet/s3_bucket"] +type = 'user' +description = 'S3 bucket in which to store data files (such as profile pictures)' + +[secrets."directory/guichet/smtp_server"] +type = 'user' +description = 'SMTP server address (hostname:port)' + +[secrets."directory/guichet/s3_secret_key"] +type = 'user' +description = 'Garage secret key for Guichet profile pictures' + +[secrets."directory/guichet/mail_from"] +type = 'user' +description = 'E-mail address from which to send welcome emails to new users' + +[secrets."directory/guichet/mail_domain"] +type = 'user' +description = 'E-mail domain for new users (e.g. example.com)' + diff --git a/cluster/staging/app/directory/secrets/directory/guichet/mail_domain b/cluster/staging/app/directory/secrets/directory/guichet/mail_domain deleted file mode 100644 index 5db1ba3..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/mail_domain +++ /dev/null @@ -1 +0,0 @@ -USER E-mail domain for new users (e.g. example.com) diff --git a/cluster/staging/app/directory/secrets/directory/guichet/mail_from b/cluster/staging/app/directory/secrets/directory/guichet/mail_from deleted file mode 100644 index 9075cbf..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/mail_from +++ /dev/null @@ -1 +0,0 @@ -USER E-mail address from which to send welcome emails to new users diff --git a/cluster/staging/app/directory/secrets/directory/guichet/s3_access_key b/cluster/staging/app/directory/secrets/directory/guichet/s3_access_key deleted file mode 100644 index e5b37ff..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Garage access key for Guichet profile pictures diff --git a/cluster/staging/app/directory/secrets/directory/guichet/s3_bucket b/cluster/staging/app/directory/secrets/directory/guichet/s3_bucket deleted file mode 100644 index cb059cf..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/s3_bucket +++ /dev/null @@ -1 +0,0 @@ -USER S3 bucket in which to store data files (such as profile pictures) diff --git a/cluster/staging/app/directory/secrets/directory/guichet/s3_endpoint b/cluster/staging/app/directory/secrets/directory/guichet/s3_endpoint deleted file mode 100644 index b414269..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/s3_endpoint +++ /dev/null @@ -1 +0,0 @@ -USER S3 endpoint URL diff --git a/cluster/staging/app/directory/secrets/directory/guichet/s3_region b/cluster/staging/app/directory/secrets/directory/guichet/s3_region deleted file mode 100644 index ef16924..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/s3_region +++ /dev/null @@ -1 +0,0 @@ -USER S3 region diff --git a/cluster/staging/app/directory/secrets/directory/guichet/s3_secret_key b/cluster/staging/app/directory/secrets/directory/guichet/s3_secret_key deleted file mode 100644 index f3e7f0f..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER Garage secret key for Guichet profile pictures diff --git a/cluster/staging/app/directory/secrets/directory/guichet/smtp_pass b/cluster/staging/app/directory/secrets/directory/guichet/smtp_pass deleted file mode 100644 index fc9d1e3..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/smtp_pass +++ /dev/null @@ -1 +0,0 @@ -USER SMTP password diff --git a/cluster/staging/app/directory/secrets/directory/guichet/smtp_server b/cluster/staging/app/directory/secrets/directory/guichet/smtp_server deleted file mode 100644 index c453935..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/smtp_server +++ /dev/null @@ -1 +0,0 @@ -USER SMTP server address (hostname:port) diff --git a/cluster/staging/app/directory/secrets/directory/guichet/smtp_user b/cluster/staging/app/directory/secrets/directory/guichet/smtp_user deleted file mode 100644 index c9c8bd0..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/smtp_user +++ /dev/null @@ -1 +0,0 @@ -USER SMTP username diff --git a/cluster/staging/app/directory/secrets/directory/guichet/web_hostname b/cluster/staging/app/directory/secrets/directory/guichet/web_hostname deleted file mode 100644 index afe2512..0000000 --- a/cluster/staging/app/directory/secrets/directory/guichet/web_hostname +++ /dev/null @@ -1 +0,0 @@ -USER Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com) diff --git a/cluster/staging/app/directory/secrets/directory/ldap_base_dn b/cluster/staging/app/directory/secrets/directory/ldap_base_dn deleted file mode 100644 index ea5c7ae..0000000 --- a/cluster/staging/app/directory/secrets/directory/ldap_base_dn +++ /dev/null @@ -1 +0,0 @@ -USER LDAP base DN for everything (e.g. dc=example,dc=com) diff --git a/cluster/staging/app/dummy/secrets.toml b/cluster/staging/app/dummy/secrets.toml new file mode 100644 index 0000000..378ec46 --- /dev/null +++ b/cluster/staging/app/dummy/secrets.toml @@ -0,0 +1,36 @@ +[service_users."dummy"] +description = 'Service user for dummy database access' +username_secret = "dummy/db_username" +password_secret = "dummy/db_password" +rotate_password = true + +[secrets."dummy/s3_access_key"] +type = 'user' +description = 'S3 access key ID for database storage' + +[secrets."dummy/s3_secret_key"] +description = 'S3 secret key for database storage' +type = 'user' + +[secrets."dummy/public_domain"] +description = 'Publicly accessible domain for dummy resource' +type = 'user' + +[secrets."dummy/form_secret"] +description = 'Form secret for dummy web pages' +type = 'command' +command = 'openssl rand -base64 42' +rotate = true + +[secrets."dummy/signing_key"] +description = 'Key to use to sign dummy service data' +type = 'command' +command = 'openssl rand -base64 42' + +[secrets."dummy/rpc_secret"] +description = 'RPC secret for communication between dummy nodes' +type = 'command' +command = 'openssl rand -base64 42' +rotate = true + + diff --git a/cluster/staging/app/garage/secrets.toml b/cluster/staging/app/garage/secrets.toml new file mode 100644 index 0000000..26ecd5e --- /dev/null +++ b/cluster/staging/app/garage/secrets.toml @@ -0,0 +1,15 @@ +[secrets."garage-staging/admin_token"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + +[secrets."garage-staging/rpc_secret"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + +[secrets."garage-staging/metrics_token"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + diff --git a/cluster/staging/app/garage/secrets/garage-staging/admin_token b/cluster/staging/app/garage/secrets/garage-staging/admin_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/staging/app/garage/secrets/garage-staging/admin_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/staging/app/garage/secrets/garage-staging/metrics_token b/cluster/staging/app/garage/secrets/garage-staging/metrics_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/staging/app/garage/secrets/garage-staging/metrics_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/staging/app/garage/secrets/garage-staging/rpc_secret b/cluster/staging/app/garage/secrets/garage-staging/rpc_secret deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/staging/app/garage/secrets/garage-staging/rpc_secret +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/staging/app/im/secrets.toml b/cluster/staging/app/im/secrets.toml new file mode 100644 index 0000000..7acad55 --- /dev/null +++ b/cluster/staging/app/im/secrets.toml @@ -0,0 +1,27 @@ +[secrets."synapse/s3_access_key"] +type = 'user' +description = 'S3 access key ID for database storage' + +[secrets."synapse/form_secret"] +type = 'command' +rotate = true +command = 'openssl rand -base64 42' + +[secrets."synapse/signing_key"] +type = 'user' +description = 'Signing key for messages' + +[secrets."synapse/macaroon_secret_key"] +type = 'command' +rotate = true +command = 'openssl rand -base64 42' + +[secrets."synapse/registration_shared_secret"] +type = 'command' +rotate = true +command = 'openssl rand -base64 42' + +[secrets."synapse/s3_secret_key"] +type = 'user' +description = 'S3 secret key for database storage' + diff --git a/cluster/staging/app/im/secrets/synapse/form_secret b/cluster/staging/app/im/secrets/synapse/form_secret deleted file mode 100644 index f601137..0000000 --- a/cluster/staging/app/im/secrets/synapse/form_secret +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 42 diff --git a/cluster/staging/app/im/secrets/synapse/macaroon_secret_key b/cluster/staging/app/im/secrets/synapse/macaroon_secret_key deleted file mode 100644 index f601137..0000000 --- a/cluster/staging/app/im/secrets/synapse/macaroon_secret_key +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 42 diff --git a/cluster/staging/app/im/secrets/synapse/registration_shared_secret b/cluster/staging/app/im/secrets/synapse/registration_shared_secret deleted file mode 100644 index f601137..0000000 --- a/cluster/staging/app/im/secrets/synapse/registration_shared_secret +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 42 diff --git a/cluster/staging/app/im/secrets/synapse/s3_access_key b/cluster/staging/app/im/secrets/synapse/s3_access_key deleted file mode 100644 index 692dc34..0000000 --- a/cluster/staging/app/im/secrets/synapse/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 access key ID for database storage diff --git a/cluster/staging/app/im/secrets/synapse/s3_secret_key b/cluster/staging/app/im/secrets/synapse/s3_secret_key deleted file mode 100644 index 8bef13c..0000000 --- a/cluster/staging/app/im/secrets/synapse/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 secret key for database storage diff --git a/cluster/staging/app/im/secrets/synapse/signing_key b/cluster/staging/app/im/secrets/synapse/signing_key deleted file mode 100644 index 6821360..0000000 --- a/cluster/staging/app/im/secrets/synapse/signing_key +++ /dev/null @@ -1 +0,0 @@ -USER Signing key for messages diff --git a/cluster/staging/app/telemetry/secrets.toml b/cluster/staging/app/telemetry/secrets.toml new file mode 100644 index 0000000..56df97d --- /dev/null +++ b/cluster/staging/app/telemetry/secrets.toml @@ -0,0 +1,13 @@ +[secrets."telemetry/grafana/s3_access_key"] +type = 'user' +description = 'S3 access key for grafana db' + +[secrets."telemetry/grafana/admin_password"] +type = 'command' +rotate = true +command = 'openssl rand -base64 12' + +[secrets."telemetry/grafana/s3_secret_key"] +type = 'user' +description = 'S3 secret key for grafana db' + diff --git a/cluster/staging/app/telemetry/secrets/telemetry/grafana/admin_password b/cluster/staging/app/telemetry/secrets/telemetry/grafana/admin_password deleted file mode 100644 index 2f36e97..0000000 --- a/cluster/staging/app/telemetry/secrets/telemetry/grafana/admin_password +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 12 diff --git a/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_access_key b/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_access_key deleted file mode 100644 index c7e41a4..0000000 --- a/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 access key for grafana db diff --git a/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_secret_key b/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_secret_key deleted file mode 100644 index 051f41a..0000000 --- a/cluster/staging/app/telemetry/secrets/telemetry/grafana/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 secret key for grafana db diff --git a/cluster/staging/secretmgr.toml b/cluster/staging/secretmgr.toml new file mode 100644 index 0000000..cbaa6f6 --- /dev/null +++ b/cluster/staging/secretmgr.toml @@ -0,0 +1,9 @@ +[ldap] +server = "ldap://localhost:1389" +service_dn_suffix = "ou=services,ou=users,dc=staging,dc=deuxfleurs,dc=org" +admin_dn = "cn=admin,dc=staging,dc=deuxfleurs,dc=org" +admin_password_secret = "directory/admin_password" + +[constants] +"dummy/public_domain" = "dummy.staging.deuxfleurs.org" +"dummy/test_constant" = "test value" -- cgit v1.2.3 From 6d6e48c8fa7f4f38a5b812389d269c025a977790 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 22:12:38 +0100 Subject: Improve secretmgr more, update secrets for staging --- cluster/staging/app/directory/secrets.toml | 9 ++++++--- cluster/staging/secretmgr.toml | 12 +++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'cluster') diff --git a/cluster/staging/app/directory/secrets.toml b/cluster/staging/app/directory/secrets.toml index 0ebd77f..edde6cc 100644 --- a/cluster/staging/app/directory/secrets.toml +++ b/cluster/staging/app/directory/secrets.toml @@ -1,6 +1,7 @@ [secrets."directory/ldap_base_dn"] type = 'user' -description = 'LDAP base DN for everything (e.g. dc=example,dc=com)' +description = 'LDAP base DN for everything' +example = 'dc=example,dc=com' [secrets."directory/guichet/smtp_user"] type = 'user' @@ -24,7 +25,8 @@ description = 'SMTP password' [secrets."directory/guichet/web_hostname"] type = 'user' -description = 'Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com)' +description = 'Public hostname from which Guichet is accessible via HTTP' +example = 'guichet.example.com' [secrets."directory/guichet/s3_bucket"] type = 'user' @@ -44,5 +46,6 @@ description = 'E-mail address from which to send welcome emails to new users' [secrets."directory/guichet/mail_domain"] type = 'user' -description = 'E-mail domain for new users (e.g. example.com)' +description = 'E-mail domain for new users' +example = 'example.com' diff --git a/cluster/staging/secretmgr.toml b/cluster/staging/secretmgr.toml index cbaa6f6..9dc0aa5 100644 --- a/cluster/staging/secretmgr.toml +++ b/cluster/staging/secretmgr.toml @@ -4,6 +4,16 @@ service_dn_suffix = "ou=services,ou=users,dc=staging,dc=deuxfleurs,dc=org" admin_dn = "cn=admin,dc=staging,dc=deuxfleurs,dc=org" admin_password_secret = "directory/admin_password" -[constants] +[user_values] +"directory/ldap_base_dn" = "dc=staging,dc=deuxfleurs,dc=org" +"directory/guichet/mail_domain" = "staging.deuxfleurs.org" +"directory/guichet/mail_from" = "contact@deuxfleurs.org" +"directory/guichet/s3_bucket" = "bottin-pictures" +"directory/guichet/s3_endpoint" = "garage.staging.deuxfleurs.org" +"directory/guichet/s3_region" = "garage-staging" +"directory/guichet/smtp_server" = "mail.gandi.net:25" +"directory/guichet/smtp_user" = "contact@deuxfleurs.org" +"directory/guichet/web_hostname" = "guichet.staging.deuxfleurs.org" + "dummy/public_domain" = "dummy.staging.deuxfleurs.org" "dummy/test_constant" = "test value" -- cgit v1.2.3 From 87bb031ed00b7993a29d74aee2e89875c5444caf Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 22:31:18 +0100 Subject: Migrate prod cluster secrets to new format --- cluster/prod/app/backup/secrets.toml | 90 +++++++++++++++++++++ .../secrets/backup/consul/backup_aws_access_key_id | 1 - .../backup/consul/backup_aws_secret_access_key | 1 - .../secrets/backup/consul/backup_restic_password | 1 - .../secrets/backup/consul/backup_restic_repository | 1 - .../backup/cryptpad/backup_aws_access_key_id | 1 - .../backup/cryptpad/backup_aws_secret_access_key | 1 - .../secrets/backup/cryptpad/backup_restic_password | 1 - .../backup/cryptpad/backup_restic_repository | 1 - cluster/prod/app/backup/secrets/backup/id_ed25519 | 1 - .../prod/app/backup/secrets/backup/id_ed25519.pub | 1 - .../backup/secrets/backup/psql/aws_access_key_id | 1 - .../secrets/backup/psql/aws_secret_access_key | 1 - .../backup/secrets/backup/psql/crypt_private_key | 1 - .../backup/secrets/backup/psql/crypt_public_key | 1 - .../prod/app/backup/secrets/backup/target_ssh_dir | 1 - .../backup/secrets/backup/target_ssh_fingerprint | 1 - .../prod/app/backup/secrets/backup/target_ssh_host | 1 - .../prod/app/backup/secrets/backup/target_ssh_port | 1 - .../prod/app/backup/secrets/backup/target_ssh_user | 1 - cluster/prod/app/core/secrets.toml | 5 ++ .../prod/app/core/secrets/directory/ldap_base_dn | 1 - cluster/prod/app/drone-ci/secrets.toml | 47 +++++++++++ .../app/drone-ci/secrets/drone-ci/cookie_secret | 1 - .../app/drone-ci/secrets/drone-ci/db_enc_secret | 1 - .../app/drone-ci/secrets/drone-ci/oauth_client_id | 1 - .../drone-ci/secrets/drone-ci/oauth_client_secret | 1 - .../prod/app/drone-ci/secrets/drone-ci/rpc_secret | 1 - cluster/prod/app/drone-ci/secrets/drone-ci/s3_ak | 1 - .../app/drone-ci/secrets/drone-ci/s3_db_bucket | 1 - cluster/prod/app/drone-ci/secrets/drone-ci/s3_sk | 1 - .../drone-ci/secrets/drone-ci/s3_storage_bucket | 1 - cluster/prod/app/email/secrets.toml | 58 ++++++++++++++ .../prod/app/email/secrets/email/dkim/smtp.private | 1 - .../secrets/email/dovecot/backup_aws_access_key_id | 1 - .../email/dovecot/backup_aws_secret_access_key | 1 - .../secrets/email/dovecot/backup_restic_password | 1 - .../secrets/email/dovecot/backup_restic_repository | 1 - .../app/email/secrets/email/dovecot/dovecot.crt | 1 - .../app/email/secrets/email/dovecot/dovecot.key | 1 - .../app/email/secrets/email/dovecot/ldap_binddn | 1 - .../app/email/secrets/email/dovecot/ldap_bindpwd | 1 - .../app/email/secrets/email/postfix/postfix.crt | 1 - .../app/email/secrets/email/postfix/postfix.key | 1 - .../prod/app/email/secrets/email/sogo/ldap_binddn | 1 - .../prod/app/email/secrets/email/sogo/ldap_bindpw | 1 - .../prod/app/email/secrets/email/sogo/postgre_auth | 1 - cluster/prod/app/garage/secrets.toml | 14 ++++ cluster/prod/app/garage/secrets/garage/admin_token | 1 - .../prod/app/garage/secrets/garage/metrics_token | 1 - cluster/prod/app/garage/secrets/garage/rpc_secret | 1 - cluster/prod/app/guichet/secrets.toml | 51 ++++++++++++ .../guichet/secrets/directory/guichet/mail_domain | 1 - .../guichet/secrets/directory/guichet/mail_from | 1 - .../secrets/directory/guichet/s3_access_key | 1 - .../guichet/secrets/directory/guichet/s3_bucket | 1 - .../guichet/secrets/directory/guichet/s3_endpoint | 1 - .../guichet/secrets/directory/guichet/s3_region | 1 - .../secrets/directory/guichet/s3_secret_key | 1 - .../guichet/secrets/directory/guichet/smtp_pass | 1 - .../guichet/secrets/directory/guichet/smtp_server | 1 - .../guichet/secrets/directory/guichet/smtp_user | 1 - .../guichet/secrets/directory/guichet/web_hostname | 1 - cluster/prod/app/jitsi/secrets.toml | 36 +++++++++ .../prod/app/jitsi/secrets/jitsi/auth.jitsi.crt | 1 - .../prod/app/jitsi/secrets/jitsi/auth.jitsi.key | 1 - cluster/prod/app/jitsi/secrets/jitsi/jicofo_pass | 1 - cluster/prod/app/jitsi/secrets/jitsi/jitsi.crt | 1 - cluster/prod/app/jitsi/secrets/jitsi/jitsi.key | 1 - cluster/prod/app/jitsi/secrets/jitsi/jvb_pass | 1 - cluster/prod/app/matrix/secrets.toml | 92 ++++++++++++++++++++++ .../app/matrix/secrets/chat/coturn/static-auth | 1 - .../secrets/chat/coturn/static_auth_secret_zinzdev | 1 - .../app/matrix/secrets/chat/easybridge/as_token | 1 - .../app/matrix/secrets/chat/easybridge/db_pass | 1 - .../app/matrix/secrets/chat/easybridge/db_user | 1 - .../app/matrix/secrets/chat/easybridge/hs_token | 1 - .../matrix/secrets/chat/easybridge/web_session_key | 2 - .../prod/app/matrix/secrets/chat/fb2mx/as_token | 1 - cluster/prod/app/matrix/secrets/chat/fb2mx/db_url | 1 - .../prod/app/matrix/secrets/chat/fb2mx/hs_token | 1 - .../secrets/chat/synapse/homeserver.signing.key | 1 - .../matrix/secrets/chat/synapse/homeserver.tls.crt | 1 - .../matrix/secrets/chat/synapse/homeserver.tls.dh | 1 - .../matrix/secrets/chat/synapse/homeserver.tls.key | 1 - .../app/matrix/secrets/chat/synapse/ldap_binddn | 1 - .../app/matrix/secrets/chat/synapse/ldap_bindpw | 1 - .../app/matrix/secrets/chat/synapse/postgres_db | 1 - .../app/matrix/secrets/chat/synapse/postgres_pwd | 1 - .../app/matrix/secrets/chat/synapse/postgres_user | 1 - .../chat/synapse/registration_shared_secret | 1 - .../app/matrix/secrets/chat/synapse/s3_access_key | 1 - .../app/matrix/secrets/chat/synapse/s3_secret_key | 1 - cluster/prod/app/plume/secrets.toml | 29 +++++++ .../plume/secrets/plume/backup_aws_access_key_id | 1 - .../secrets/plume/backup_aws_secret_access_key | 1 - .../app/plume/secrets/plume/backup_restic_password | 1 - .../plume/secrets/plume/backup_restic_repository | 1 - cluster/prod/app/plume/secrets/plume/pgsql_pw | 1 - cluster/prod/app/plume/secrets/plume/secret_key | 1 - cluster/prod/app/postgres/secrets.toml | 10 +++ .../postgres/secrets/postgres/keeper/pg_repl_pwd | 1 - .../secrets/postgres/keeper/pg_repl_username | 1 - .../app/postgres/secrets/postgres/keeper/pg_su_pwd | 1 - cluster/prod/app/secretmgr | 1 - cluster/prod/app/telemetry/secrets.toml | 16 ++++ .../secrets/telemetry/grafana/admin_password | 1 - .../secrets/telemetry/grafana/s3_access_key | 1 - .../secrets/telemetry/grafana/s3_secret_key | 1 - cluster/prod/secretmgr.toml | 9 +++ 110 files changed, 457 insertions(+), 99 deletions(-) create mode 100644 cluster/prod/app/backup/secrets.toml delete mode 100644 cluster/prod/app/backup/secrets/backup/consul/backup_aws_access_key_id delete mode 100644 cluster/prod/app/backup/secrets/backup/consul/backup_aws_secret_access_key delete mode 100644 cluster/prod/app/backup/secrets/backup/consul/backup_restic_password delete mode 100644 cluster/prod/app/backup/secrets/backup/consul/backup_restic_repository delete mode 100644 cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_access_key_id delete mode 100644 cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_secret_access_key delete mode 100644 cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_password delete mode 100644 cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_repository delete mode 100644 cluster/prod/app/backup/secrets/backup/id_ed25519 delete mode 100644 cluster/prod/app/backup/secrets/backup/id_ed25519.pub delete mode 100644 cluster/prod/app/backup/secrets/backup/psql/aws_access_key_id delete mode 100644 cluster/prod/app/backup/secrets/backup/psql/aws_secret_access_key delete mode 100644 cluster/prod/app/backup/secrets/backup/psql/crypt_private_key delete mode 100644 cluster/prod/app/backup/secrets/backup/psql/crypt_public_key delete mode 100644 cluster/prod/app/backup/secrets/backup/target_ssh_dir delete mode 100644 cluster/prod/app/backup/secrets/backup/target_ssh_fingerprint delete mode 100644 cluster/prod/app/backup/secrets/backup/target_ssh_host delete mode 100644 cluster/prod/app/backup/secrets/backup/target_ssh_port delete mode 100644 cluster/prod/app/backup/secrets/backup/target_ssh_user create mode 100644 cluster/prod/app/core/secrets.toml delete mode 100644 cluster/prod/app/core/secrets/directory/ldap_base_dn create mode 100644 cluster/prod/app/drone-ci/secrets.toml delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/cookie_secret delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/db_enc_secret delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_id delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_secret delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/rpc_secret delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/s3_ak delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/s3_db_bucket delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/s3_sk delete mode 100644 cluster/prod/app/drone-ci/secrets/drone-ci/s3_storage_bucket create mode 100644 cluster/prod/app/email/secrets.toml delete mode 100644 cluster/prod/app/email/secrets/email/dkim/smtp.private delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/backup_aws_access_key_id delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/backup_aws_secret_access_key delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/backup_restic_password delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/backup_restic_repository delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/dovecot.crt delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/dovecot.key delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/ldap_binddn delete mode 100644 cluster/prod/app/email/secrets/email/dovecot/ldap_bindpwd delete mode 100644 cluster/prod/app/email/secrets/email/postfix/postfix.crt delete mode 100644 cluster/prod/app/email/secrets/email/postfix/postfix.key delete mode 100644 cluster/prod/app/email/secrets/email/sogo/ldap_binddn delete mode 100644 cluster/prod/app/email/secrets/email/sogo/ldap_bindpw delete mode 100644 cluster/prod/app/email/secrets/email/sogo/postgre_auth create mode 100644 cluster/prod/app/garage/secrets.toml delete mode 100644 cluster/prod/app/garage/secrets/garage/admin_token delete mode 100644 cluster/prod/app/garage/secrets/garage/metrics_token delete mode 100644 cluster/prod/app/garage/secrets/garage/rpc_secret create mode 100644 cluster/prod/app/guichet/secrets.toml delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/mail_domain delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/mail_from delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/s3_access_key delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/s3_bucket delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/s3_endpoint delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/s3_region delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/s3_secret_key delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/smtp_pass delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/smtp_server delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/smtp_user delete mode 100644 cluster/prod/app/guichet/secrets/directory/guichet/web_hostname create mode 100644 cluster/prod/app/jitsi/secrets.toml delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.crt delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.key delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/jicofo_pass delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/jitsi.crt delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/jitsi.key delete mode 100644 cluster/prod/app/jitsi/secrets/jitsi/jvb_pass create mode 100644 cluster/prod/app/matrix/secrets.toml delete mode 100644 cluster/prod/app/matrix/secrets/chat/coturn/static-auth delete mode 100644 cluster/prod/app/matrix/secrets/chat/coturn/static_auth_secret_zinzdev delete mode 100644 cluster/prod/app/matrix/secrets/chat/easybridge/as_token delete mode 100644 cluster/prod/app/matrix/secrets/chat/easybridge/db_pass delete mode 100644 cluster/prod/app/matrix/secrets/chat/easybridge/db_user delete mode 100644 cluster/prod/app/matrix/secrets/chat/easybridge/hs_token delete mode 100644 cluster/prod/app/matrix/secrets/chat/easybridge/web_session_key delete mode 100644 cluster/prod/app/matrix/secrets/chat/fb2mx/as_token delete mode 100644 cluster/prod/app/matrix/secrets/chat/fb2mx/db_url delete mode 100644 cluster/prod/app/matrix/secrets/chat/fb2mx/hs_token delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/homeserver.signing.key delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.crt delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.dh delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.key delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/ldap_binddn delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/ldap_bindpw delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/postgres_db delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/postgres_pwd delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/postgres_user delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/registration_shared_secret delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/s3_access_key delete mode 100644 cluster/prod/app/matrix/secrets/chat/synapse/s3_secret_key create mode 100644 cluster/prod/app/plume/secrets.toml delete mode 100644 cluster/prod/app/plume/secrets/plume/backup_aws_access_key_id delete mode 100644 cluster/prod/app/plume/secrets/plume/backup_aws_secret_access_key delete mode 100644 cluster/prod/app/plume/secrets/plume/backup_restic_password delete mode 100644 cluster/prod/app/plume/secrets/plume/backup_restic_repository delete mode 100644 cluster/prod/app/plume/secrets/plume/pgsql_pw delete mode 100644 cluster/prod/app/plume/secrets/plume/secret_key create mode 100644 cluster/prod/app/postgres/secrets.toml delete mode 100644 cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd delete mode 100644 cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username delete mode 100644 cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd delete mode 120000 cluster/prod/app/secretmgr create mode 100644 cluster/prod/app/telemetry/secrets.toml delete mode 100644 cluster/prod/app/telemetry/secrets/telemetry/grafana/admin_password delete mode 100644 cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_access_key delete mode 100644 cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_secret_key create mode 100644 cluster/prod/secretmgr.toml (limited to 'cluster') diff --git a/cluster/prod/app/backup/secrets.toml b/cluster/prod/app/backup/secrets.toml new file mode 100644 index 0000000..5d2b851 --- /dev/null +++ b/cluster/prod/app/backup/secrets.toml @@ -0,0 +1,90 @@ +# Cryptpad backup + +[secrets."backup/cryptpad/backup_restic_password"] +type = 'user' +description = 'Restic password to encrypt backups' + +[secrets."backup/cryptpad/backup_aws_secret_access_key"] +type = 'user' +description = 'Backup AWS secret access key' + +[secrets."backup/cryptpad/backup_restic_repository"] +type = 'user' +description = 'Restic repository' +example = 's3:https://s3.garage.tld' + +[secrets."backup/cryptpad/backup_aws_access_key_id"] +type = 'user' +description = 'Backup AWS access key ID' + + +# Consul backup + +[secrets."backup/consul/backup_restic_password"] +type = 'user' +description = 'Restic password to encrypt backups' + +[secrets."backup/consul/backup_aws_secret_access_key"] +type = 'user' +description = 'Backup AWS secret access key' + +[secrets."backup/consul/backup_restic_repository"] +type = 'user' +description = 'Restic repository' +example = 's3:https://s3.garage.tld' + +[secrets."backup/consul/backup_aws_access_key_id"] +type = 'user' +description = 'Backup AWS access key ID' + + +# Postgresql backup + +[secrets."backup/psql/aws_secret_access_key"] +type = 'user' +description = 'Minio secret key' + +[secrets."backup/psql/aws_access_key_id"] +type = 'user' +description = 'Minio access key' + +[secrets."backup/psql/crypt_public_key"] +type = 'user' +description = 'A public key to encypt backups with age' + +[secrets."backup/psql/crypt_private_key"] +type = 'user' +description = 'a private key to decript backups from age' + + +# SSH target config (do we still use this?) + +[secrets."backup/target_ssh_host"] +type = 'user' +description = 'Hostname of the backup target host' + +[secrets."backup/target_ssh_port"] +type = 'user' +description = 'SSH port number to connect to the target host' + +[secrets."backup/target_ssh_dir"] +type = 'user' +description = 'Directory where to store backups on target host' + +[secrets."backup/target_ssh_user"] +type = 'user' +description = 'SSH username to log in as on the target host' + +[secrets."backup/target_ssh_fingerprint"] +type = 'user' +description = 'SSH fingerprint of the target machine (format: copy here the corresponding line from your known_hosts file)' + +[secrets."backup/id_ed25519"] +type = 'user' +multiline = true +description = 'Private ed25519 key of the container doing the backup' + +[secrets."backup/id_ed25519.pub"] +type = 'user' +description = 'Public ed25519 key of the container doing the backup (this key must be in authorized_keys on the backup target host)' + diff --git a/cluster/prod/app/backup/secrets/backup/consul/backup_aws_access_key_id b/cluster/prod/app/backup/secrets/backup/consul/backup_aws_access_key_id deleted file mode 100644 index 9235e53..0000000 --- a/cluster/prod/app/backup/secrets/backup/consul/backup_aws_access_key_id +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS access key ID diff --git a/cluster/prod/app/backup/secrets/backup/consul/backup_aws_secret_access_key b/cluster/prod/app/backup/secrets/backup/consul/backup_aws_secret_access_key deleted file mode 100644 index f34677e..0000000 --- a/cluster/prod/app/backup/secrets/backup/consul/backup_aws_secret_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS secret access key diff --git a/cluster/prod/app/backup/secrets/backup/consul/backup_restic_password b/cluster/prod/app/backup/secrets/backup/consul/backup_restic_password deleted file mode 100644 index fbaa5fa..0000000 --- a/cluster/prod/app/backup/secrets/backup/consul/backup_restic_password +++ /dev/null @@ -1 +0,0 @@ -USER Restic password to encrypt backups diff --git a/cluster/prod/app/backup/secrets/backup/consul/backup_restic_repository b/cluster/prod/app/backup/secrets/backup/consul/backup_restic_repository deleted file mode 100644 index 3f6cb93..0000000 --- a/cluster/prod/app/backup/secrets/backup/consul/backup_restic_repository +++ /dev/null @@ -1 +0,0 @@ -USER Restic repository, eg. s3:https://s3.garage.tld diff --git a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_access_key_id b/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_access_key_id deleted file mode 100644 index 9235e53..0000000 --- a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_access_key_id +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS access key ID diff --git a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_secret_access_key b/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_secret_access_key deleted file mode 100644 index f34677e..0000000 --- a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_aws_secret_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS secret access key diff --git a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_password b/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_password deleted file mode 100644 index fbaa5fa..0000000 --- a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_password +++ /dev/null @@ -1 +0,0 @@ -USER Restic password to encrypt backups diff --git a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_repository b/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_repository deleted file mode 100644 index 3f6cb93..0000000 --- a/cluster/prod/app/backup/secrets/backup/cryptpad/backup_restic_repository +++ /dev/null @@ -1 +0,0 @@ -USER Restic repository, eg. s3:https://s3.garage.tld diff --git a/cluster/prod/app/backup/secrets/backup/id_ed25519 b/cluster/prod/app/backup/secrets/backup/id_ed25519 deleted file mode 100644 index 9d7fd46..0000000 --- a/cluster/prod/app/backup/secrets/backup/id_ed25519 +++ /dev/null @@ -1 +0,0 @@ -USER_LONG Private ed25519 key of the container doing the backup diff --git a/cluster/prod/app/backup/secrets/backup/id_ed25519.pub b/cluster/prod/app/backup/secrets/backup/id_ed25519.pub deleted file mode 100644 index 0a2ab35..0000000 --- a/cluster/prod/app/backup/secrets/backup/id_ed25519.pub +++ /dev/null @@ -1 +0,0 @@ -USER Public ed25519 key of the container doing the backup (this key must be in authorized_keys on the backup target host) diff --git a/cluster/prod/app/backup/secrets/backup/psql/aws_access_key_id b/cluster/prod/app/backup/secrets/backup/psql/aws_access_key_id deleted file mode 100644 index 82375d7..0000000 --- a/cluster/prod/app/backup/secrets/backup/psql/aws_access_key_id +++ /dev/null @@ -1 +0,0 @@ -USER Minio access key diff --git a/cluster/prod/app/backup/secrets/backup/psql/aws_secret_access_key b/cluster/prod/app/backup/secrets/backup/psql/aws_secret_access_key deleted file mode 100644 index de5090c..0000000 --- a/cluster/prod/app/backup/secrets/backup/psql/aws_secret_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Minio secret key diff --git a/cluster/prod/app/backup/secrets/backup/psql/crypt_private_key b/cluster/prod/app/backup/secrets/backup/psql/crypt_private_key deleted file mode 100644 index 4abece9..0000000 --- a/cluster/prod/app/backup/secrets/backup/psql/crypt_private_key +++ /dev/null @@ -1 +0,0 @@ -USER a private key to decript backups from age diff --git a/cluster/prod/app/backup/secrets/backup/psql/crypt_public_key b/cluster/prod/app/backup/secrets/backup/psql/crypt_public_key deleted file mode 100644 index 156ad47..0000000 --- a/cluster/prod/app/backup/secrets/backup/psql/crypt_public_key +++ /dev/null @@ -1 +0,0 @@ -USER A public key to encypt backups with age diff --git a/cluster/prod/app/backup/secrets/backup/target_ssh_dir b/cluster/prod/app/backup/secrets/backup/target_ssh_dir deleted file mode 100644 index 3b2a4da..0000000 --- a/cluster/prod/app/backup/secrets/backup/target_ssh_dir +++ /dev/null @@ -1 +0,0 @@ -USER Directory where to store backups on target host diff --git a/cluster/prod/app/backup/secrets/backup/target_ssh_fingerprint b/cluster/prod/app/backup/secrets/backup/target_ssh_fingerprint deleted file mode 100644 index 608f3ec..0000000 --- a/cluster/prod/app/backup/secrets/backup/target_ssh_fingerprint +++ /dev/null @@ -1 +0,0 @@ -USER SSH fingerprint of the target machine (format: copy here the corresponding line from your known_hosts file) diff --git a/cluster/prod/app/backup/secrets/backup/target_ssh_host b/cluster/prod/app/backup/secrets/backup/target_ssh_host deleted file mode 100644 index 6268f87..0000000 --- a/cluster/prod/app/backup/secrets/backup/target_ssh_host +++ /dev/null @@ -1 +0,0 @@ -USER Hostname of the backup target host diff --git a/cluster/prod/app/backup/secrets/backup/target_ssh_port b/cluster/prod/app/backup/secrets/backup/target_ssh_port deleted file mode 100644 index 309dd38..0000000 --- a/cluster/prod/app/backup/secrets/backup/target_ssh_port +++ /dev/null @@ -1 +0,0 @@ -USER SSH port number to connect to the target host diff --git a/cluster/prod/app/backup/secrets/backup/target_ssh_user b/cluster/prod/app/backup/secrets/backup/target_ssh_user deleted file mode 100644 index 98b3046..0000000 --- a/cluster/prod/app/backup/secrets/backup/target_ssh_user +++ /dev/null @@ -1 +0,0 @@ -USER SSH username to log in as on the target host diff --git a/cluster/prod/app/core/secrets.toml b/cluster/prod/app/core/secrets.toml new file mode 100644 index 0000000..736c9dd --- /dev/null +++ b/cluster/prod/app/core/secrets.toml @@ -0,0 +1,5 @@ +[secrets."directory/ldap_base_dn"] +type = 'user' +description = 'LDAP base DN for everything' +example = 'dc=example,dc=com' + diff --git a/cluster/prod/app/core/secrets/directory/ldap_base_dn b/cluster/prod/app/core/secrets/directory/ldap_base_dn deleted file mode 100644 index ea5c7ae..0000000 --- a/cluster/prod/app/core/secrets/directory/ldap_base_dn +++ /dev/null @@ -1 +0,0 @@ -USER LDAP base DN for everything (e.g. dc=example,dc=com) diff --git a/cluster/prod/app/drone-ci/secrets.toml b/cluster/prod/app/drone-ci/secrets.toml new file mode 100644 index 0000000..5bd98d0 --- /dev/null +++ b/cluster/prod/app/drone-ci/secrets.toml @@ -0,0 +1,47 @@ +# Drone's secrets + +[secrets."drone-ci/rpc_secret"] +type = 'command' +rotate = true +command = 'openssl rand -hex 16' + +[secrets."drone-ci/cookie_secret"] +type = 'command' +rotate = true +command = 'openssl rand -hex 16' + +[secrets."drone-ci/db_enc_secret"] +type = 'command' +command = 'openssl rand -hex 16' + + +# Oauth config for gitea + +[secrets."drone-ci/oauth_client_secret"] +type = 'user' +description = 'OAuth client secret (for gitea)' + +[secrets."drone-ci/oauth_client_id"] +type = 'user' +description = 'OAuth client ID (on Gitea)' + + +# S3 config for Git LFS storage + +[secrets."drone-ci/s3_db_bucket"] +type = 'constant' +value = 'drone-db' + +[secrets."drone-ci/s3_sk"] +type = 'user' +description = 'S3 (garage) secret key for Drone' + +[secrets."drone-ci/s3_ak"] +type = 'user' +description = 'S3 (garage) access key for Drone' + +[secrets."drone-ci/s3_storage_bucket"] +type = 'constant' +value = 'drone-storage' + + diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/cookie_secret b/cluster/prod/app/drone-ci/secrets/drone-ci/cookie_secret deleted file mode 100644 index 04c819e..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/cookie_secret +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 16 diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/db_enc_secret b/cluster/prod/app/drone-ci/secrets/drone-ci/db_enc_secret deleted file mode 100644 index 3f9e696..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/db_enc_secret +++ /dev/null @@ -1 +0,0 @@ -CMD_ONCE openssl rand -hex 16 diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_id b/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_id deleted file mode 100644 index c801b28..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_id +++ /dev/null @@ -1 +0,0 @@ -USER OAuth client ID (on Gitea) diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_secret b/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_secret deleted file mode 100644 index b79b688..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/oauth_client_secret +++ /dev/null @@ -1 +0,0 @@ -USER OAuth client secret (for gitea) diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/rpc_secret b/cluster/prod/app/drone-ci/secrets/drone-ci/rpc_secret deleted file mode 100644 index 04c819e..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/rpc_secret +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 16 diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_ak b/cluster/prod/app/drone-ci/secrets/drone-ci/s3_ak deleted file mode 100644 index 3a8e4a2..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_ak +++ /dev/null @@ -1 +0,0 @@ -USER S3 (garage) access key for Drone diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_db_bucket b/cluster/prod/app/drone-ci/secrets/drone-ci/s3_db_bucket deleted file mode 100644 index c36f17d..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_db_bucket +++ /dev/null @@ -1 +0,0 @@ -CONST drone-db diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_sk b/cluster/prod/app/drone-ci/secrets/drone-ci/s3_sk deleted file mode 100644 index 46fd9fa..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_sk +++ /dev/null @@ -1 +0,0 @@ -USER S3 (garage) secret key for Drone diff --git a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_storage_bucket b/cluster/prod/app/drone-ci/secrets/drone-ci/s3_storage_bucket deleted file mode 100644 index ca2702c..0000000 --- a/cluster/prod/app/drone-ci/secrets/drone-ci/s3_storage_bucket +++ /dev/null @@ -1 +0,0 @@ -CONST drone-storage diff --git a/cluster/prod/app/email/secrets.toml b/cluster/prod/app/email/secrets.toml new file mode 100644 index 0000000..4efee49 --- /dev/null +++ b/cluster/prod/app/email/secrets.toml @@ -0,0 +1,58 @@ +# ---- POSTFIX ---- + +[secrets."email/postfix/postfix.key"] +type = 'SSL_KEY' +name = 'postfix' + +[secrets."email/postfix/postfix.crt"] +type = 'SSL_CERT' +name = 'postfix' +cert_domains = "['deuxfleurs.fr']" + +[secrets."email/dkim/smtp.private"] +type = 'RSA_PRIVATE_KEY' +name = 'dkim' + +# ---- DOVECOT ---- + +[service_users."dovecot"] +dn_secret = "email/dovecot/ldap_binddn" +password_secret = "email/dovecot/ldap_bindpwd" + + +[secrets."email/dovecot/dovecot.key"] +type = 'SSL_KEY' +name = 'dovecot' + +[secrets."email/dovecot/dovecot.crt"] +type = 'SSL_CERT' +name = 'dovecot' +cert_domains = "['deuxfleurs.fr']" + + +[secrets."email/dovecot/backup_restic_password"] +type = 'user' +description = 'Restic backup password to encrypt data' + +[secrets."email/dovecot/backup_aws_secret_access_key"] +type = 'user' +description = 'AWS Secret Access key' + +[secrets."email/dovecot/backup_restic_repository"] +type = 'user' +description = 'Restic Repository URL, check op_guide/backup-minio to see the format' + +[secrets."email/dovecot/backup_aws_access_key_id"] +type = 'user' +description = 'AWS Acces Key ID' + +# ---- SOGO ---- + +[service_users."sogo"] +dn_secret = "email/sogo/ldap_binddn" +password_secret = "email/sogo/ldap_bindpw" + +[secrets."email/sogo/postgre_auth"] +type = 'user' +description = 'SoGo postgres auth (format: sogo:) (TODO: replace this with two separate files and change template)' + diff --git a/cluster/prod/app/email/secrets/email/dkim/smtp.private b/cluster/prod/app/email/secrets/email/dkim/smtp.private deleted file mode 100644 index 3aa3621..0000000 --- a/cluster/prod/app/email/secrets/email/dkim/smtp.private +++ /dev/null @@ -1 +0,0 @@ -RSA_PRIVATE_KEY dkim diff --git a/cluster/prod/app/email/secrets/email/dovecot/backup_aws_access_key_id b/cluster/prod/app/email/secrets/email/dovecot/backup_aws_access_key_id deleted file mode 100644 index 9ae6adf..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/backup_aws_access_key_id +++ /dev/null @@ -1 +0,0 @@ -USER AWS Acces Key ID diff --git a/cluster/prod/app/email/secrets/email/dovecot/backup_aws_secret_access_key b/cluster/prod/app/email/secrets/email/dovecot/backup_aws_secret_access_key deleted file mode 100644 index ac95906..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/backup_aws_secret_access_key +++ /dev/null @@ -1 +0,0 @@ -USER AWS Secret Access key diff --git a/cluster/prod/app/email/secrets/email/dovecot/backup_restic_password b/cluster/prod/app/email/secrets/email/dovecot/backup_restic_password deleted file mode 100644 index c19a4a3..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/backup_restic_password +++ /dev/null @@ -1 +0,0 @@ -USER Restic backup password to encrypt data diff --git a/cluster/prod/app/email/secrets/email/dovecot/backup_restic_repository b/cluster/prod/app/email/secrets/email/dovecot/backup_restic_repository deleted file mode 100644 index 0434a15..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/backup_restic_repository +++ /dev/null @@ -1 +0,0 @@ -USER Restic Repository URL, check op_guide/backup-minio to see the format diff --git a/cluster/prod/app/email/secrets/email/dovecot/dovecot.crt b/cluster/prod/app/email/secrets/email/dovecot/dovecot.crt deleted file mode 100644 index 7229cfc..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/dovecot.crt +++ /dev/null @@ -1 +0,0 @@ -SSL_CERT dovecot deuxfleurs.fr diff --git a/cluster/prod/app/email/secrets/email/dovecot/dovecot.key b/cluster/prod/app/email/secrets/email/dovecot/dovecot.key deleted file mode 100644 index 0d42c79..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/dovecot.key +++ /dev/null @@ -1 +0,0 @@ -SSL_KEY dovecot diff --git a/cluster/prod/app/email/secrets/email/dovecot/ldap_binddn b/cluster/prod/app/email/secrets/email/dovecot/ldap_binddn deleted file mode 100644 index da380f2..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/ldap_binddn +++ /dev/null @@ -1 +0,0 @@ -SERVICE_DN dovecot Dovecot IMAP server diff --git a/cluster/prod/app/email/secrets/email/dovecot/ldap_bindpwd b/cluster/prod/app/email/secrets/email/dovecot/ldap_bindpwd deleted file mode 100644 index 068f663..0000000 --- a/cluster/prod/app/email/secrets/email/dovecot/ldap_bindpwd +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD dovecot diff --git a/cluster/prod/app/email/secrets/email/postfix/postfix.crt b/cluster/prod/app/email/secrets/email/postfix/postfix.crt deleted file mode 100644 index f004d67..0000000 --- a/cluster/prod/app/email/secrets/email/postfix/postfix.crt +++ /dev/null @@ -1 +0,0 @@ -SSL_CERT postfix deuxfleurs.fr diff --git a/cluster/prod/app/email/secrets/email/postfix/postfix.key b/cluster/prod/app/email/secrets/email/postfix/postfix.key deleted file mode 100644 index 2cf1706..0000000 --- a/cluster/prod/app/email/secrets/email/postfix/postfix.key +++ /dev/null @@ -1 +0,0 @@ -SSL_KEY postfix diff --git a/cluster/prod/app/email/secrets/email/sogo/ldap_binddn b/cluster/prod/app/email/secrets/email/sogo/ldap_binddn deleted file mode 100644 index df627d3..0000000 --- a/cluster/prod/app/email/secrets/email/sogo/ldap_binddn +++ /dev/null @@ -1 +0,0 @@ -SERVICE_DN sogo SoGo email frontend diff --git a/cluster/prod/app/email/secrets/email/sogo/ldap_bindpw b/cluster/prod/app/email/secrets/email/sogo/ldap_bindpw deleted file mode 100644 index 8d2f35b..0000000 --- a/cluster/prod/app/email/secrets/email/sogo/ldap_bindpw +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD sogo diff --git a/cluster/prod/app/email/secrets/email/sogo/postgre_auth b/cluster/prod/app/email/secrets/email/sogo/postgre_auth deleted file mode 100644 index 4f66253..0000000 --- a/cluster/prod/app/email/secrets/email/sogo/postgre_auth +++ /dev/null @@ -1 +0,0 @@ -USER SoGo postgres auth (format: sogo:) (TODO: replace this with two separate files and change template) diff --git a/cluster/prod/app/garage/secrets.toml b/cluster/prod/app/garage/secrets.toml new file mode 100644 index 0000000..e616091 --- /dev/null +++ b/cluster/prod/app/garage/secrets.toml @@ -0,0 +1,14 @@ +[secrets."garage/rpc_secret"] +type = 'command' +command = 'openssl rand -hex 32' +# can't auto-rotate, because we still have some nodes outside of Nomad + +[secrets."garage/admin_token"] +type = 'command' +command = 'openssl rand -hex 32' +rotate = true + +[secrets."garage/metrics_token"] +type = 'command' +command = 'openssl rand -hex 32' +rotate = true diff --git a/cluster/prod/app/garage/secrets/garage/admin_token b/cluster/prod/app/garage/secrets/garage/admin_token deleted file mode 100644 index d831d53..0000000 --- a/cluster/prod/app/garage/secrets/garage/admin_token +++ /dev/null @@ -1 +0,0 @@ -CMD_ONCE openssl rand -hex 32 diff --git a/cluster/prod/app/garage/secrets/garage/metrics_token b/cluster/prod/app/garage/secrets/garage/metrics_token deleted file mode 100644 index d831d53..0000000 --- a/cluster/prod/app/garage/secrets/garage/metrics_token +++ /dev/null @@ -1 +0,0 @@ -CMD_ONCE openssl rand -hex 32 diff --git a/cluster/prod/app/garage/secrets/garage/rpc_secret b/cluster/prod/app/garage/secrets/garage/rpc_secret deleted file mode 100644 index d831d53..0000000 --- a/cluster/prod/app/garage/secrets/garage/rpc_secret +++ /dev/null @@ -1 +0,0 @@ -CMD_ONCE openssl rand -hex 32 diff --git a/cluster/prod/app/guichet/secrets.toml b/cluster/prod/app/guichet/secrets.toml new file mode 100644 index 0000000..d614b27 --- /dev/null +++ b/cluster/prod/app/guichet/secrets.toml @@ -0,0 +1,51 @@ +# General configuration + +[secrets."directory/guichet/web_hostname"] +type = 'user' +description = 'Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com)' + + +# Mailing configuration + +[secrets."directory/guichet/smtp_user"] +type = 'user' +description = 'SMTP username' + +[secrets."directory/guichet/smtp_pass"] +type = 'user' +description = 'SMTP password' + +[secrets."directory/guichet/smtp_server"] +type = 'user' +description = 'SMTP server address (hostname:port)' + +[secrets."directory/guichet/mail_from"] +type = 'user' +description = 'E-mail address from which to send welcome emails to new users' + +[secrets."directory/guichet/mail_domain"] +type = 'user' +description = 'E-mail domain for new users (e.g. example.com)' + + +# S3 configuration + +[secrets."directory/guichet/s3_endpoint"] +type = 'user' +description = 'S3 endpoint URL' + +[secrets."directory/guichet/s3_bucket"] +type = 'user' +description = 'S3 bucket in which to store data files (such as profile pictures)' + +[secrets."directory/guichet/s3_region"] +type = 'user' +description = 'S3 region' + +[secrets."directory/guichet/s3_access_key"] +type = 'user' +description = 'Garage access key for Guichet profile pictures' + +[secrets."directory/guichet/s3_secret_key"] +type = 'user' +description = 'Garage secret key for Guichet profile pictures' diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/mail_domain b/cluster/prod/app/guichet/secrets/directory/guichet/mail_domain deleted file mode 100644 index 5db1ba3..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/mail_domain +++ /dev/null @@ -1 +0,0 @@ -USER E-mail domain for new users (e.g. example.com) diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/mail_from b/cluster/prod/app/guichet/secrets/directory/guichet/mail_from deleted file mode 100644 index 9075cbf..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/mail_from +++ /dev/null @@ -1 +0,0 @@ -USER E-mail address from which to send welcome emails to new users diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/s3_access_key b/cluster/prod/app/guichet/secrets/directory/guichet/s3_access_key deleted file mode 100644 index e5b37ff..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Garage access key for Guichet profile pictures diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/s3_bucket b/cluster/prod/app/guichet/secrets/directory/guichet/s3_bucket deleted file mode 100644 index cb059cf..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/s3_bucket +++ /dev/null @@ -1 +0,0 @@ -USER S3 bucket in which to store data files (such as profile pictures) diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/s3_endpoint b/cluster/prod/app/guichet/secrets/directory/guichet/s3_endpoint deleted file mode 100644 index b414269..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/s3_endpoint +++ /dev/null @@ -1 +0,0 @@ -USER S3 endpoint URL diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/s3_region b/cluster/prod/app/guichet/secrets/directory/guichet/s3_region deleted file mode 100644 index ef16924..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/s3_region +++ /dev/null @@ -1 +0,0 @@ -USER S3 region diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/s3_secret_key b/cluster/prod/app/guichet/secrets/directory/guichet/s3_secret_key deleted file mode 100644 index f3e7f0f..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER Garage secret key for Guichet profile pictures diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_pass b/cluster/prod/app/guichet/secrets/directory/guichet/smtp_pass deleted file mode 100644 index fc9d1e3..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_pass +++ /dev/null @@ -1 +0,0 @@ -USER SMTP password diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_server b/cluster/prod/app/guichet/secrets/directory/guichet/smtp_server deleted file mode 100644 index c453935..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_server +++ /dev/null @@ -1 +0,0 @@ -USER SMTP server address (hostname:port) diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_user b/cluster/prod/app/guichet/secrets/directory/guichet/smtp_user deleted file mode 100644 index c9c8bd0..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/smtp_user +++ /dev/null @@ -1 +0,0 @@ -USER SMTP username diff --git a/cluster/prod/app/guichet/secrets/directory/guichet/web_hostname b/cluster/prod/app/guichet/secrets/directory/guichet/web_hostname deleted file mode 100644 index afe2512..0000000 --- a/cluster/prod/app/guichet/secrets/directory/guichet/web_hostname +++ /dev/null @@ -1 +0,0 @@ -USER Public hostname from which Guichet is accessible via HTTP (e.g. guichet.example.com) diff --git a/cluster/prod/app/jitsi/secrets.toml b/cluster/prod/app/jitsi/secrets.toml new file mode 100644 index 0000000..cb6126f --- /dev/null +++ b/cluster/prod/app/jitsi/secrets.toml @@ -0,0 +1,36 @@ +# Jitsi secrets + +[secrets."jitsi/jvb_pass"] +type = 'command' +rotate = true +command = 'openssl rand -base64 24' + +[secrets."jitsi/jicofo_pass"] +type = 'command' +rotate = true +command = 'openssl rand -base64 24' + + +# SSL: Jitsi + +[secrets."jitsi/jitsi.crt"] +type = 'SSL_CERT' +name = 'jitsi' +cert_domains = "['jitsi']" + +[secrets."jitsi/jitsi.key"] +type = 'SSL_KEY' +name = 'jitsi' + + +# SSL: Jitsi auth + +[secrets."jitsi/auth.jitsi.crt"] +type = 'SSL_CERT' +name = 'jitsi_auth' +cert_domains = "['auth.jitsi']" + +[secrets."jitsi/auth.jitsi.key"] +type = 'SSL_KEY' +name = 'jitsi_auth' + diff --git a/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.crt b/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.crt deleted file mode 100644 index f4ab925..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.crt +++ /dev/null @@ -1 +0,0 @@ -SSL_CERT jitsi_auth auth.jitsi diff --git a/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.key b/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.key deleted file mode 100644 index 82e7b6b..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/auth.jitsi.key +++ /dev/null @@ -1 +0,0 @@ -SSL_KEY jitsi_auth auth.jitsi diff --git a/cluster/prod/app/jitsi/secrets/jitsi/jicofo_pass b/cluster/prod/app/jitsi/secrets/jitsi/jicofo_pass deleted file mode 100644 index 6a0f5fc..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/jicofo_pass +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 24 diff --git a/cluster/prod/app/jitsi/secrets/jitsi/jitsi.crt b/cluster/prod/app/jitsi/secrets/jitsi/jitsi.crt deleted file mode 100644 index 2eed97c..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/jitsi.crt +++ /dev/null @@ -1 +0,0 @@ -SSL_CERT jitsi jitsi diff --git a/cluster/prod/app/jitsi/secrets/jitsi/jitsi.key b/cluster/prod/app/jitsi/secrets/jitsi/jitsi.key deleted file mode 100644 index af53ca0..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/jitsi.key +++ /dev/null @@ -1 +0,0 @@ -SSL_KEY jitsi jitsi diff --git a/cluster/prod/app/jitsi/secrets/jitsi/jvb_pass b/cluster/prod/app/jitsi/secrets/jitsi/jvb_pass deleted file mode 100644 index 6a0f5fc..0000000 --- a/cluster/prod/app/jitsi/secrets/jitsi/jvb_pass +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 24 diff --git a/cluster/prod/app/matrix/secrets.toml b/cluster/prod/app/matrix/secrets.toml new file mode 100644 index 0000000..6e4f027 --- /dev/null +++ b/cluster/prod/app/matrix/secrets.toml @@ -0,0 +1,92 @@ +[service_users."matrix"] +description = 'Matrix service user' +dn_secret = 'chat/synapse/ldap_binddn' +password_secret = 'chat/synapse/ldap_bindpw' + + +# Postgresql DB + +[secrets."chat/synapse/postgres_db"] +type = 'constant' +value = 'synapse' + +[secrets."chat/synapse/postgres_user"] +type = 'service_username' +service = 'matrix' + +[secrets."chat/synapse/postgres_pwd"] +type = 'service_password' +service = 'matrix' + + +# S3 access + +[secrets."chat/synapse/s3_access_key"] +type = 'user' +description = 'S3 access key ID for Matrix bucket' + +[secrets."chat/synapse/s3_secret_key"] +type = 'user' +description = 'S3 secret access key for Matrix bucket' + + +# Keys & stuff + +[secrets."chat/synapse/homeserver.tls.dh"] +type = 'user' +multiline = true +description = 'DH parameters for matrix ssl key? how does this work?' + +[secrets."chat/synapse/homeserver.tls.crt"] +type = 'SSL_CERT' +name = 'synapse' +cert_domains = "['im.deuxfleurs.fr']" + +[secrets."chat/synapse/homeserver.tls.key"] +type = 'SSL_KEY' +name = 'synapse' + +[secrets."chat/synapse/homeserver.signing.key"] +type = 'user' +description = 'Synapse homeserver ed25519 signing key' + +[secrets."chat/synapse/registration_shared_secret"] +type = 'command' +rotate = true +command = 'head -c 32 /dev/urandom | base64' + + +# ----------- COTURN ----------- + +[secrets."chat/coturn/static-auth"] +type = 'user' +description = 'coturn static-auth (what is this?)' + +[secrets."chat/coturn/static_auth_secret_zinzdev"] +type = 'user' +description = "Serveur coturn (TURN/STUN) d'Adrien, c'est un jeton d'identification." + + +# ----------- EASYBRIDGE (we will remove this one day) ----------- + +[service_users."easybridge"] +description = 'Easybridge service user' +password_secret = 'chat/easybridge/db_pass' +username_secret = 'chat/easybridge/db_user' + + +[secrets."chat/easybridge/as_token"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + +[secrets."chat/easybridge/web_session_key"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + +[secrets."chat/easybridge/hs_token"] +type = 'command' +rotate = true +command = 'openssl rand -hex 32' + diff --git a/cluster/prod/app/matrix/secrets/chat/coturn/static-auth b/cluster/prod/app/matrix/secrets/chat/coturn/static-auth deleted file mode 100644 index 43628ef..0000000 --- a/cluster/prod/app/matrix/secrets/chat/coturn/static-auth +++ /dev/null @@ -1 +0,0 @@ -USER coturn static-auth (what is this?) diff --git a/cluster/prod/app/matrix/secrets/chat/coturn/static_auth_secret_zinzdev b/cluster/prod/app/matrix/secrets/chat/coturn/static_auth_secret_zinzdev deleted file mode 100644 index c61486d..0000000 --- a/cluster/prod/app/matrix/secrets/chat/coturn/static_auth_secret_zinzdev +++ /dev/null @@ -1 +0,0 @@ -USER Serveur coturn (TURN/STUN) d'Adrien, c'est un jeton d'identification. \ No newline at end of file diff --git a/cluster/prod/app/matrix/secrets/chat/easybridge/as_token b/cluster/prod/app/matrix/secrets/chat/easybridge/as_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/prod/app/matrix/secrets/chat/easybridge/as_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/prod/app/matrix/secrets/chat/easybridge/db_pass b/cluster/prod/app/matrix/secrets/chat/easybridge/db_pass deleted file mode 100644 index 7e1f94b..0000000 --- a/cluster/prod/app/matrix/secrets/chat/easybridge/db_pass +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD easybridge diff --git a/cluster/prod/app/matrix/secrets/chat/easybridge/db_user b/cluster/prod/app/matrix/secrets/chat/easybridge/db_user deleted file mode 100644 index 436267c..0000000 --- a/cluster/prod/app/matrix/secrets/chat/easybridge/db_user +++ /dev/null @@ -1 +0,0 @@ -CONST easybridge diff --git a/cluster/prod/app/matrix/secrets/chat/easybridge/hs_token b/cluster/prod/app/matrix/secrets/chat/easybridge/hs_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/prod/app/matrix/secrets/chat/easybridge/hs_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/prod/app/matrix/secrets/chat/easybridge/web_session_key b/cluster/prod/app/matrix/secrets/chat/easybridge/web_session_key deleted file mode 100644 index 614bed7..0000000 --- a/cluster/prod/app/matrix/secrets/chat/easybridge/web_session_key +++ /dev/null @@ -1,2 +0,0 @@ -CMD openssl rand -hex 32 - diff --git a/cluster/prod/app/matrix/secrets/chat/fb2mx/as_token b/cluster/prod/app/matrix/secrets/chat/fb2mx/as_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/prod/app/matrix/secrets/chat/fb2mx/as_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/prod/app/matrix/secrets/chat/fb2mx/db_url b/cluster/prod/app/matrix/secrets/chat/fb2mx/db_url deleted file mode 100644 index f06e265..0000000 --- a/cluster/prod/app/matrix/secrets/chat/fb2mx/db_url +++ /dev/null @@ -1 +0,0 @@ -USER fb2mx database URL, format: postgres://username:password@hostname/dbname diff --git a/cluster/prod/app/matrix/secrets/chat/fb2mx/hs_token b/cluster/prod/app/matrix/secrets/chat/fb2mx/hs_token deleted file mode 100644 index 5fa4e3c..0000000 --- a/cluster/prod/app/matrix/secrets/chat/fb2mx/hs_token +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -hex 32 diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.signing.key b/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.signing.key deleted file mode 100644 index 099bd18..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.signing.key +++ /dev/null @@ -1 +0,0 @@ -USER Synapse homeserver ed25519 signing key diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.crt b/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.crt deleted file mode 100644 index b696093..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.crt +++ /dev/null @@ -1 +0,0 @@ -SSL_CERT synapse im.deuxfleurs.fr diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.dh b/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.dh deleted file mode 100644 index 0231fed..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.dh +++ /dev/null @@ -1 +0,0 @@ -USER_LONG DH parameters for matrix ssl key? how does this work? diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.key b/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.key deleted file mode 100644 index feee544..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/homeserver.tls.key +++ /dev/null @@ -1 +0,0 @@ -SSL_KEY synapse im.deuxfleurs.fr diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/ldap_binddn b/cluster/prod/app/matrix/secrets/chat/synapse/ldap_binddn deleted file mode 100644 index 2631bef..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/ldap_binddn +++ /dev/null @@ -1 +0,0 @@ -SERVICE_DN matrix Matrix chat server diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/ldap_bindpw b/cluster/prod/app/matrix/secrets/chat/synapse/ldap_bindpw deleted file mode 100644 index ba07446..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/ldap_bindpw +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD matrix diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_db b/cluster/prod/app/matrix/secrets/chat/synapse/postgres_db deleted file mode 100644 index 74eefa7..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_db +++ /dev/null @@ -1 +0,0 @@ -CONST synapse diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_pwd b/cluster/prod/app/matrix/secrets/chat/synapse/postgres_pwd deleted file mode 100644 index ba07446..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_pwd +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD matrix diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_user b/cluster/prod/app/matrix/secrets/chat/synapse/postgres_user deleted file mode 100644 index b08e86a..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/postgres_user +++ /dev/null @@ -1 +0,0 @@ -CONST matrix diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/registration_shared_secret b/cluster/prod/app/matrix/secrets/chat/synapse/registration_shared_secret deleted file mode 100644 index b82f191..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/registration_shared_secret +++ /dev/null @@ -1 +0,0 @@ -CMD head -c 32 /dev/urandom | base64 diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/s3_access_key b/cluster/prod/app/matrix/secrets/chat/synapse/s3_access_key deleted file mode 100644 index ab09a8e..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER matrix diff --git a/cluster/prod/app/matrix/secrets/chat/synapse/s3_secret_key b/cluster/prod/app/matrix/secrets/chat/synapse/s3_secret_key deleted file mode 100644 index ab09a8e..0000000 --- a/cluster/prod/app/matrix/secrets/chat/synapse/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER matrix diff --git a/cluster/prod/app/plume/secrets.toml b/cluster/prod/app/plume/secrets.toml new file mode 100644 index 0000000..a445979 --- /dev/null +++ b/cluster/prod/app/plume/secrets.toml @@ -0,0 +1,29 @@ +[service_user."plume"] +password_secret = "plume/pgsql_pw" + + +[secrets."plume/secret_key"] +type = 'command' +rotate = true +command = 'openssl rand -base64 32' + + +# Plume backup + +[secrets."plume/backup_restic_repository"] +type = 'user' +description = 'Restic repository' +example = 's3:https://s3.garage.tld' + +[secrets."plume/backup_restic_password"] +type = 'user' +description = 'Restic password to encrypt backups' + +[secrets."plume/backup_aws_secret_access_key"] +type = 'user' +description = 'Backup AWS secret access key' + +[secrets."plume/backup_aws_access_key_id"] +type = 'user' +description = 'Backup AWS access key ID' + diff --git a/cluster/prod/app/plume/secrets/plume/backup_aws_access_key_id b/cluster/prod/app/plume/secrets/plume/backup_aws_access_key_id deleted file mode 100644 index 9235e53..0000000 --- a/cluster/prod/app/plume/secrets/plume/backup_aws_access_key_id +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS access key ID diff --git a/cluster/prod/app/plume/secrets/plume/backup_aws_secret_access_key b/cluster/prod/app/plume/secrets/plume/backup_aws_secret_access_key deleted file mode 100644 index f34677e..0000000 --- a/cluster/prod/app/plume/secrets/plume/backup_aws_secret_access_key +++ /dev/null @@ -1 +0,0 @@ -USER Backup AWS secret access key diff --git a/cluster/prod/app/plume/secrets/plume/backup_restic_password b/cluster/prod/app/plume/secrets/plume/backup_restic_password deleted file mode 100644 index fbaa5fa..0000000 --- a/cluster/prod/app/plume/secrets/plume/backup_restic_password +++ /dev/null @@ -1 +0,0 @@ -USER Restic password to encrypt backups diff --git a/cluster/prod/app/plume/secrets/plume/backup_restic_repository b/cluster/prod/app/plume/secrets/plume/backup_restic_repository deleted file mode 100644 index 3f6cb93..0000000 --- a/cluster/prod/app/plume/secrets/plume/backup_restic_repository +++ /dev/null @@ -1 +0,0 @@ -USER Restic repository, eg. s3:https://s3.garage.tld diff --git a/cluster/prod/app/plume/secrets/plume/pgsql_pw b/cluster/prod/app/plume/secrets/plume/pgsql_pw deleted file mode 100644 index 0f831bb..0000000 --- a/cluster/prod/app/plume/secrets/plume/pgsql_pw +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD plume diff --git a/cluster/prod/app/plume/secrets/plume/secret_key b/cluster/prod/app/plume/secrets/plume/secret_key deleted file mode 100644 index 978be54..0000000 --- a/cluster/prod/app/plume/secrets/plume/secret_key +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 32 diff --git a/cluster/prod/app/postgres/secrets.toml b/cluster/prod/app/postgres/secrets.toml new file mode 100644 index 0000000..537a72d --- /dev/null +++ b/cluster/prod/app/postgres/secrets.toml @@ -0,0 +1,10 @@ +[service_users."replicator"] +password_secret = "postgres/keeper/pg_repl_pwd" +username_secret = "postgres/keeper/pg_repl_username" + + +[secrets."postgres/keeper/pg_su_pwd"] +type = 'command' +command = 'openssl rand -base64 15' +description = 'postgres superuser password' + diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd deleted file mode 100644 index ae0c229..0000000 --- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_pwd +++ /dev/null @@ -1 +0,0 @@ -SERVICE_PASSWORD replicator diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username deleted file mode 100644 index 58e6e46..0000000 --- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_repl_username +++ /dev/null @@ -1 +0,0 @@ -CONST replicator diff --git a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd b/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd deleted file mode 100644 index 907e2b8..0000000 --- a/cluster/prod/app/postgres/secrets/postgres/keeper/pg_su_pwd +++ /dev/null @@ -1 +0,0 @@ -USER postgres superuser password diff --git a/cluster/prod/app/secretmgr b/cluster/prod/app/secretmgr deleted file mode 120000 index 6aff4ad..0000000 --- a/cluster/prod/app/secretmgr +++ /dev/null @@ -1 +0,0 @@ -../../../secretmgr/secretmgr \ No newline at end of file diff --git a/cluster/prod/app/telemetry/secrets.toml b/cluster/prod/app/telemetry/secrets.toml new file mode 100644 index 0000000..763a14c --- /dev/null +++ b/cluster/prod/app/telemetry/secrets.toml @@ -0,0 +1,16 @@ +[secrets."telemetry/grafana/admin_password"] +type = 'command' +rotate = true +command = 'openssl rand -base64 12' + + +# S3 database storage access + +[secrets."telemetry/grafana/s3_access_key"] +type = 'user' +description = 'S3 access key for grafana db' + +[secrets."telemetry/grafana/s3_secret_key"] +type = 'user' +description = 'S3 secret key for grafana db' + diff --git a/cluster/prod/app/telemetry/secrets/telemetry/grafana/admin_password b/cluster/prod/app/telemetry/secrets/telemetry/grafana/admin_password deleted file mode 100644 index 2f36e97..0000000 --- a/cluster/prod/app/telemetry/secrets/telemetry/grafana/admin_password +++ /dev/null @@ -1 +0,0 @@ -CMD openssl rand -base64 12 diff --git a/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_access_key b/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_access_key deleted file mode 100644 index c7e41a4..0000000 --- a/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_access_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 access key for grafana db diff --git a/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_secret_key b/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_secret_key deleted file mode 100644 index 051f41a..0000000 --- a/cluster/prod/app/telemetry/secrets/telemetry/grafana/s3_secret_key +++ /dev/null @@ -1 +0,0 @@ -USER S3 secret key for grafana db diff --git a/cluster/prod/secretmgr.toml b/cluster/prod/secretmgr.toml new file mode 100644 index 0000000..88058e5 --- /dev/null +++ b/cluster/prod/secretmgr.toml @@ -0,0 +1,9 @@ +[ldap] +server = "ldap://localhost:1389" +service_dn_suffix = "ou=services,ou=users,dc=deuxfleurs,dc=fr" +admin_dn = "cn=admin,dc=deuxfleurs,dc=org" + + +[user_values] +"directory/ldap_base_dn" = "dc=deuxfleurs,dc=fr" +"directory/guichet/web_hostname" = "guichet.deuxfleurs.fr" -- cgit v1.2.3 From 8cee3b0043eda68d982e5359a0d009c83cbb85c4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 22:45:05 +0100 Subject: Update prod secret files --- cluster/prod/app/backup/secrets.toml | 52 +++++++++++++------------- cluster/prod/app/email/secrets.toml | 16 -------- cluster/prod/app/matrix/secrets.toml | 71 +++++++++++++++++++----------------- cluster/prod/app/plume/secrets.toml | 19 ---------- cluster/prod/secretmgr.toml | 10 +++++ 5 files changed, 74 insertions(+), 94 deletions(-) (limited to 'cluster') diff --git a/cluster/prod/app/backup/secrets.toml b/cluster/prod/app/backup/secrets.toml index 5d2b851..91794ae 100644 --- a/cluster/prod/app/backup/secrets.toml +++ b/cluster/prod/app/backup/secrets.toml @@ -40,51 +40,53 @@ description = 'Backup AWS access key ID' # Postgresql backup -[secrets."backup/psql/aws_secret_access_key"] -type = 'user' -description = 'Minio secret key' - -[secrets."backup/psql/aws_access_key_id"] +[secrets."postgres/backup/aws_access_key_id"] type = 'user' description = 'Minio access key' -[secrets."backup/psql/crypt_public_key"] +[secrets."postgres/backup/aws_secret_access_key"] type = 'user' -description = 'A public key to encypt backups with age' +description = 'Minio secret key' -[secrets."backup/psql/crypt_private_key"] +[secrets."postgres/backup/crypt_public_key"] type = 'user' -description = 'a private key to decript backups from age' +description = 'A public key to encypt backups with age' -# SSH target config (do we still use this?) +# Plume backup -[secrets."backup/target_ssh_host"] +[secrets."plume/backup_restic_repository"] type = 'user' -description = 'Hostname of the backup target host' +description = 'Restic repository' +example = 's3:https://s3.garage.tld' -[secrets."backup/target_ssh_port"] +[secrets."plume/backup_restic_password"] type = 'user' -description = 'SSH port number to connect to the target host' +description = 'Restic password to encrypt backups' -[secrets."backup/target_ssh_dir"] +[secrets."plume/backup_aws_secret_access_key"] type = 'user' -description = 'Directory where to store backups on target host' +description = 'Backup AWS secret access key' -[secrets."backup/target_ssh_user"] +[secrets."plume/backup_aws_access_key_id"] type = 'user' -description = 'SSH username to log in as on the target host' +description = 'Backup AWS access key ID' -[secrets."backup/target_ssh_fingerprint"] + +# Dovecot backup + +[secrets."email/dovecot/backup_restic_password"] type = 'user' -description = 'SSH fingerprint of the target machine (format: copy here the corresponding line from your known_hosts file)' +description = 'Restic backup password to encrypt data' -[secrets."backup/id_ed25519"] +[secrets."email/dovecot/backup_aws_secret_access_key"] type = 'user' -multiline = true -description = 'Private ed25519 key of the container doing the backup' +description = 'AWS Secret Access key' -[secrets."backup/id_ed25519.pub"] +[secrets."email/dovecot/backup_restic_repository"] type = 'user' -description = 'Public ed25519 key of the container doing the backup (this key must be in authorized_keys on the backup target host)' +description = 'Restic Repository URL, check op_guide/backup-minio to see the format' +[secrets."email/dovecot/backup_aws_access_key_id"] +type = 'user' +description = 'AWS Acces Key ID' diff --git a/cluster/prod/app/email/secrets.toml b/cluster/prod/app/email/secrets.toml index 4efee49..95df626 100644 --- a/cluster/prod/app/email/secrets.toml +++ b/cluster/prod/app/email/secrets.toml @@ -30,22 +30,6 @@ name = 'dovecot' cert_domains = "['deuxfleurs.fr']" -[secrets."email/dovecot/backup_restic_password"] -type = 'user' -description = 'Restic backup password to encrypt data' - -[secrets."email/dovecot/backup_aws_secret_access_key"] -type = 'user' -description = 'AWS Secret Access key' - -[secrets."email/dovecot/backup_restic_repository"] -type = 'user' -description = 'Restic Repository URL, check op_guide/backup-minio to see the format' - -[secrets."email/dovecot/backup_aws_access_key_id"] -type = 'user' -description = 'AWS Acces Key ID' - # ---- SOGO ---- [service_users."sogo"] diff --git a/cluster/prod/app/matrix/secrets.toml b/cluster/prod/app/matrix/secrets.toml index 6e4f027..98b2ddb 100644 --- a/cluster/prod/app/matrix/secrets.toml +++ b/cluster/prod/app/matrix/secrets.toml @@ -7,8 +7,9 @@ password_secret = 'chat/synapse/ldap_bindpw' # Postgresql DB [secrets."chat/synapse/postgres_db"] -type = 'constant' -value = 'synapse' +type = 'user' +description = 'Synapse PostgrSQL database name' +example = 'synapse' [secrets."chat/synapse/postgres_user"] type = 'service_username' @@ -56,37 +57,39 @@ rotate = true command = 'head -c 32 /dev/urandom | base64' -# ----------- COTURN ----------- - -[secrets."chat/coturn/static-auth"] -type = 'user' -description = 'coturn static-auth (what is this?)' - -[secrets."chat/coturn/static_auth_secret_zinzdev"] -type = 'user' -description = "Serveur coturn (TURN/STUN) d'Adrien, c'est un jeton d'identification." - - -# ----------- EASYBRIDGE (we will remove this one day) ----------- - -[service_users."easybridge"] -description = 'Easybridge service user' -password_secret = 'chat/easybridge/db_pass' -username_secret = 'chat/easybridge/db_user' - +# ===== OLD STUFF, KEPT FOR REFERENCE ==== -[secrets."chat/easybridge/as_token"] -type = 'command' -rotate = true -command = 'openssl rand -hex 32' - -[secrets."chat/easybridge/web_session_key"] -type = 'command' -rotate = true -command = 'openssl rand -hex 32' - -[secrets."chat/easybridge/hs_token"] -type = 'command' -rotate = true -command = 'openssl rand -hex 32' +# ----------- COTURN ----------- +# [secrets."chat/coturn/static-auth"] +# type = 'user' +# description = 'coturn static-auth (what is this?)' +# +# [secrets."chat/coturn/static_auth_secret_zinzdev"] +# type = 'user' +# description = "Serveur coturn (TURN/STUN) d'Adrien, c'est un jeton d'identification." + + +# ----------- EASYBRIDGE ----------- + +# [service_users."easybridge"] +# description = 'Easybridge service user' +# password_secret = 'chat/easybridge/db_pass' +# username_secret = 'chat/easybridge/db_user' +# +# +# [secrets."chat/easybridge/as_token"] +# type = 'command' +# rotate = true +# command = 'openssl rand -hex 32' +# +# [secrets."chat/easybridge/web_session_key"] +# type = 'command' +# rotate = true +# command = 'openssl rand -hex 32' +# +# [secrets."chat/easybridge/hs_token"] +# type = 'command' +# rotate = true +# command = 'openssl rand -hex 32' +# diff --git a/cluster/prod/app/plume/secrets.toml b/cluster/prod/app/plume/secrets.toml index a445979..4d68a5c 100644 --- a/cluster/prod/app/plume/secrets.toml +++ b/cluster/prod/app/plume/secrets.toml @@ -8,22 +8,3 @@ rotate = true command = 'openssl rand -base64 32' -# Plume backup - -[secrets."plume/backup_restic_repository"] -type = 'user' -description = 'Restic repository' -example = 's3:https://s3.garage.tld' - -[secrets."plume/backup_restic_password"] -type = 'user' -description = 'Restic password to encrypt backups' - -[secrets."plume/backup_aws_secret_access_key"] -type = 'user' -description = 'Backup AWS secret access key' - -[secrets."plume/backup_aws_access_key_id"] -type = 'user' -description = 'Backup AWS access key ID' - diff --git a/cluster/prod/secretmgr.toml b/cluster/prod/secretmgr.toml index 88058e5..ea540e5 100644 --- a/cluster/prod/secretmgr.toml +++ b/cluster/prod/secretmgr.toml @@ -7,3 +7,13 @@ admin_dn = "cn=admin,dc=deuxfleurs,dc=org" [user_values] "directory/ldap_base_dn" = "dc=deuxfleurs,dc=fr" "directory/guichet/web_hostname" = "guichet.deuxfleurs.fr" +"directory/guichet/mail_domain" = "deuxfleurs.fr" +"directory/guichet/s3_bucket" = "bottin-pictures" +"directory/guichet/s3_endpoint" = "garage.deuxfleurs.fr" +"directory/guichet/s3_region" = "garage" +# TODO: fix smtp server, use deuxfleurs' smtp + +"drone-ci/s3_db_bucket" = "drone-db" +"drone-ci/s3_storage_bucket" = "drone-storage" + +"chat/synapse/postgres_db" = "synapse2" -- cgit v1.2.3 From 3b7437619162551f281aa4c60621152f37a66b39 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 22:50:20 +0100 Subject: update drone secrets for rotation --- cluster/prod/app/drone-ci/secrets.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cluster') diff --git a/cluster/prod/app/drone-ci/secrets.toml b/cluster/prod/app/drone-ci/secrets.toml index 5bd98d0..ac07926 100644 --- a/cluster/prod/app/drone-ci/secrets.toml +++ b/cluster/prod/app/drone-ci/secrets.toml @@ -2,8 +2,8 @@ [secrets."drone-ci/rpc_secret"] type = 'command' -rotate = true command = 'openssl rand -hex 16' +# don't rotate, it would break all runners [secrets."drone-ci/cookie_secret"] type = 'command' @@ -13,6 +13,7 @@ command = 'openssl rand -hex 16' [secrets."drone-ci/db_enc_secret"] type = 'command' command = 'openssl rand -hex 16' +# don't rotate, it is used to encrypt data which we would lose if we change this # Oauth config for gitea -- cgit v1.2.3 From 40f56707535a7167c1ea1e4bafb0868dfaba8117 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 23:03:37 +0100 Subject: Remove old way of doing email certs (self-signed) --- cluster/prod/app/email/config/dovecot/certs.gen | 13 ------------- cluster/prod/app/email/config/postfix/certs.gen | 13 ------------- cluster/prod/app/email/deploy/email.hcl | 4 ---- cluster/prod/app/email/secrets.toml | 19 ------------------- 4 files changed, 49 deletions(-) delete mode 100755 cluster/prod/app/email/config/dovecot/certs.gen delete mode 100755 cluster/prod/app/email/config/postfix/certs.gen (limited to 'cluster') diff --git a/cluster/prod/app/email/config/dovecot/certs.gen b/cluster/prod/app/email/config/dovecot/certs.gen deleted file mode 100755 index f26e917..0000000 --- a/cluster/prod/app/email/config/dovecot/certs.gen +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -TLSINFO="/C=FR/ST=Bretagne/L=Rennes/O=Deuxfleurs/CN=imap.deuxfleurs.fr" -openssl req \ - -new \ - -newkey rsa:4096 \ - -days 3650 \ - -nodes \ - -x509 \ - -subj ${TLSINFO} \ - -keyout dovecot.key \ - -out dovecot.crt - diff --git a/cluster/prod/app/email/config/postfix/certs.gen b/cluster/prod/app/email/config/postfix/certs.gen deleted file mode 100755 index f25439b..0000000 --- a/cluster/prod/app/email/config/postfix/certs.gen +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -TLSINFO="/C=FR/ST=Bretagne/L=Rennes/O=Deuxfleurs/CN=smtp.deuxfleurs.fr" -openssl req \ - -new \ - -newkey rsa:4096 \ - -days 3650 \ - -nodes \ - -x509 \ - -subj ${TLSINFO} \ - -keyout postfix.key \ - -out postfix.crt - diff --git a/cluster/prod/app/email/deploy/email.hcl b/cluster/prod/app/email/deploy/email.hcl index 7925975..84f4c3b 100644 --- a/cluster/prod/app/email/deploy/email.hcl +++ b/cluster/prod/app/email/deploy/email.hcl @@ -150,13 +150,11 @@ job "email" { # ----- secrets ------ template { - # data = "{{ key \"secrets/email/dovecot/dovecot.crt\" }}" data = "{{ with $d := key \"tricot/certs/imap.deuxfleurs.fr\" | parseJSON }}{{ $d.cert_pem }}{{ end }}" destination = "secrets/ssl/certs/dovecot.crt" perms = "400" } template { - # data = "{{ key \"secrets/email/dovecot/dovecot.key\" }}" data = "{{ with $d := key \"tricot/certs/imap.deuxfleurs.fr\" | parseJSON }}{{ $d.key_pem }}{{ end }}" destination = "secrets/ssl/private/dovecot.key" perms = "400" @@ -381,14 +379,12 @@ job "email" { # --- secrets --- template { - # data = "{{ key \"secrets/email/postfix/postfix.crt\" }}" data = "{{ with $d := key \"tricot/certs/smtp.deuxfleurs.fr\" | parseJSON }}{{ $d.cert_pem }}{{ end }}" destination = "secrets/ssl/postfix.crt" perms = "400" } template { - # data = "{{ key \"secrets/email/postfix/postfix.key\" }}" data = "{{ with $d := key \"tricot/certs/smtp.deuxfleurs.fr\" | parseJSON }}{{ $d.key_pem }}{{ end }}" destination = "secrets/ssl/postfix.key" perms = "400" diff --git a/cluster/prod/app/email/secrets.toml b/cluster/prod/app/email/secrets.toml index 95df626..6263e33 100644 --- a/cluster/prod/app/email/secrets.toml +++ b/cluster/prod/app/email/secrets.toml @@ -1,14 +1,5 @@ # ---- POSTFIX ---- -[secrets."email/postfix/postfix.key"] -type = 'SSL_KEY' -name = 'postfix' - -[secrets."email/postfix/postfix.crt"] -type = 'SSL_CERT' -name = 'postfix' -cert_domains = "['deuxfleurs.fr']" - [secrets."email/dkim/smtp.private"] type = 'RSA_PRIVATE_KEY' name = 'dkim' @@ -20,16 +11,6 @@ dn_secret = "email/dovecot/ldap_binddn" password_secret = "email/dovecot/ldap_bindpwd" -[secrets."email/dovecot/dovecot.key"] -type = 'SSL_KEY' -name = 'dovecot' - -[secrets."email/dovecot/dovecot.crt"] -type = 'SSL_CERT' -name = 'dovecot' -cert_domains = "['deuxfleurs.fr']" - - # ---- SOGO ---- [service_users."sogo"] -- cgit v1.2.3 From 0d8c6a2d45c7b6bbb86f2d4268423578f0995894 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 25 Dec 2022 23:54:55 +0100 Subject: Remove obsolete Matrix TLS keys --- cluster/prod/app/matrix/config/synapse/homeserver.yaml | 16 ---------------- cluster/prod/app/matrix/deploy/im.hcl | 15 --------------- cluster/prod/app/matrix/secrets.toml | 14 -------------- 3 files changed, 45 deletions(-) (limited to 'cluster') diff --git a/cluster/prod/app/matrix/config/synapse/homeserver.yaml b/cluster/prod/app/matrix/config/synapse/homeserver.yaml index b4b7c67..48ae431 100644 --- a/cluster/prod/app/matrix/config/synapse/homeserver.yaml +++ b/cluster/prod/app/matrix/config/synapse/homeserver.yaml @@ -1,22 +1,6 @@ # vim:ft=yaml server_name: "deuxfleurs.fr" -# PEM encoded X509 certificate for TLS. -# You can replace the self-signed certificate that synapse -# autogenerates on launch with your own SSL certificate + key pair -# if you like. Any required intermediary certificates can be -# appended after the primary certificate in hierarchical order. -tls_certificate_path: "/etc/matrix-synapse/homeserver.tls.crt" - -# PEM encoded private key for TLS -tls_private_key_path: "/etc/matrix-synapse/homeserver.tls.key" - -# PEM dh parameters for ephemeral keys -tls_dh_params_path: "/etc/matrix-synapse/homeserver.tls.dh" - -# Don't bind to the https port -no_tls: True - ## Server ## diff --git a/cluster/prod/app/matrix/deploy/im.hcl b/cluster/prod/app/matrix/deploy/im.hcl index bd28feb..339fea7 100644 --- a/cluster/prod/app/matrix/deploy/im.hcl +++ b/cluster/prod/app/matrix/deploy/im.hcl @@ -54,21 +54,6 @@ job "matrix" { } # --- secrets --- - template { - data = "{{ key \"secrets/chat/synapse/homeserver.tls.crt\" }}" - destination = "secrets/conf/homeserver.tls.crt" - } - - template { - data = "{{ key \"secrets/chat/synapse/homeserver.tls.dh\" }}" - destination = "secrets/conf/homeserver.tls.dh" - } - - template { - data = "{{ key \"secrets/chat/synapse/homeserver.tls.key\" }}" - destination = "secrets/conf/homeserver.tls.key" - } - template { data = "{{ key \"secrets/chat/synapse/homeserver.signing.key\" }}" destination = "secrets/conf/homeserver.signing.key" diff --git a/cluster/prod/app/matrix/secrets.toml b/cluster/prod/app/matrix/secrets.toml index 98b2ddb..8cd1572 100644 --- a/cluster/prod/app/matrix/secrets.toml +++ b/cluster/prod/app/matrix/secrets.toml @@ -33,20 +33,6 @@ description = 'S3 secret access key for Matrix bucket' # Keys & stuff -[secrets."chat/synapse/homeserver.tls.dh"] -type = 'user' -multiline = true -description = 'DH parameters for matrix ssl key? how does this work?' - -[secrets."chat/synapse/homeserver.tls.crt"] -type = 'SSL_CERT' -name = 'synapse' -cert_domains = "['im.deuxfleurs.fr']" - -[secrets."chat/synapse/homeserver.tls.key"] -type = 'SSL_KEY' -name = 'synapse' - [secrets."chat/synapse/homeserver.signing.key"] type = 'user' description = 'Synapse homeserver ed25519 signing key' -- cgit v1.2.3