From e7980db6851dbe67ced230ff7003014d6a639c92 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 15 Mar 2022 12:01:51 +0100 Subject: [PATCH] separate internal and external certificates from the reverse proxy --- .gitignore | 1 + .../2022.03.08/apache/dictionaries/20_web.xml | 2 +- .../2022.03.08/apache/templates/server.crt | 2 +- .../2022.03.08/apache/templates/server.key | 2 +- .../dovecot/dictionaries/22_dovecot.xml | 4 ++-- .../templates/ca_InternalReverseProxy.crt | 1 + .../dovecot/templates/ca_ReverseProxy.crt | 1 - .../dictionaries/25_nginx.xml | 20 ++----------------- ...eProxy.crt => ca_InternalReverseProxy.crt} | 0 .../templates/certificate.crt | 6 +----- .../templates/private.key | 2 +- .../templates/revprox-nginx.conf | 11 ++-------- .../dictionaries/20_nginx_client.xml | 4 ++-- ...eProxy.crt => ca_InternalReverseProxy.crt} | 2 +- .../templates/revprox.crt | 4 ++-- .../templates/revprox.key | 2 +- 16 files changed, 19 insertions(+), 45 deletions(-) create mode 100644 .gitignore create mode 100644 seed/applicationservice/2022.03.08/dovecot/templates/ca_InternalReverseProxy.crt delete mode 100644 seed/applicationservice/2022.03.08/dovecot/templates/ca_ReverseProxy.crt rename seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/{ca_ReverseProxy.crt => ca_InternalReverseProxy.crt} (100%) rename seed/applicationservice/2022.03.08/reverse-proxy-client/templates/{ca_ReverseProxy.crt => ca_InternalReverseProxy.crt} (73%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bee8a64b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/seed/applicationservice/2022.03.08/apache/dictionaries/20_web.xml b/seed/applicationservice/2022.03.08/apache/dictionaries/20_web.xml index e51a2dae..7cb15a82 100644 --- a/seed/applicationservice/2022.03.08/apache/dictionaries/20_web.xml +++ b/seed/applicationservice/2022.03.08/apache/dictionaries/20_web.xml @@ -24,7 +24,7 @@ revprox_client_server_domainname - ReverseProxy + InternalReverseProxy server_ca diff --git a/seed/applicationservice/2022.03.08/apache/templates/server.crt b/seed/applicationservice/2022.03.08/apache/templates/server.crt index a07a55fc..36e5562b 100644 --- a/seed/applicationservice/2022.03.08/apache/templates/server.crt +++ b/seed/applicationservice/2022.03.08/apache/templates/server.crt @@ -1 +1 @@ -%%get_certificate(%%domain_name_eth0, authority_cn=%%revprox_client_server_domainname, authority_name="ReverseProxy") +%%get_certificate(%%domain_name_eth0, authority_cn=%%revprox_client_server_domainname, authority_name="InternalReverseProxy") diff --git a/seed/applicationservice/2022.03.08/apache/templates/server.key b/seed/applicationservice/2022.03.08/apache/templates/server.key index 3855f574..53e9ce02 100644 --- a/seed/applicationservice/2022.03.08/apache/templates/server.key +++ b/seed/applicationservice/2022.03.08/apache/templates/server.key @@ -1 +1 @@ -%%get_private_key(%%domain_name_eth0, authority_cn=%%revprox_client_server_domainname, authority_name="ReverseProxy") +%%get_private_key(%%domain_name_eth0, authority_cn=%%revprox_client_server_domainname, authority_name="InternalReverseProxy") diff --git a/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml b/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml index 3e72304f..e82fbafc 100644 --- a/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml +++ b/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml @@ -17,7 +17,7 @@ - revprox_ca_file + revprox_ca_file /sysusers.d/1dovecot.conf /tmpfiles.d/0dovecot.conf /etc/dovecot/conf.d/10-logging.conf @@ -99,7 +99,7 @@ tls_ca_directory - ca_ReverseProxy.crt + ca_InternalReverseProxy.crt / revprox_ca_file diff --git a/seed/applicationservice/2022.03.08/dovecot/templates/ca_InternalReverseProxy.crt b/seed/applicationservice/2022.03.08/dovecot/templates/ca_InternalReverseProxy.crt new file mode 100644 index 00000000..172e3cd2 --- /dev/null +++ b/seed/applicationservice/2022.03.08/dovecot/templates/ca_InternalReverseProxy.crt @@ -0,0 +1 @@ +%%get_chain(%%revprox_server_domainname, authority_name='InternalReverseProxy') diff --git a/seed/applicationservice/2022.03.08/dovecot/templates/ca_ReverseProxy.crt b/seed/applicationservice/2022.03.08/dovecot/templates/ca_ReverseProxy.crt deleted file mode 100644 index e0bc5f99..00000000 --- a/seed/applicationservice/2022.03.08/dovecot/templates/ca_ReverseProxy.crt +++ /dev/null @@ -1 +0,0 @@ -%%get_chain(%%revprox_server_domainname, authority_name='ReverseProxy') diff --git a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/dictionaries/25_nginx.xml b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/dictionaries/25_nginx.xml index 328d849b..08161b53 100644 --- a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/dictionaries/25_nginx.xml +++ b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/dictionaries/25_nginx.xml @@ -5,8 +5,7 @@ /etc/nginx/conf.d/options-rp.conf /etc/nginx/conf.d/risotto.conf - nginx_chain_filename - /etc/pki/ca-trust/source/anchors/ca_ReverseProxy.crt + /etc/pki/ca-trust/source/anchors/ca_InternalReverseProxy.crt nginx_certificate_filename nginx_private_key_filename @@ -26,8 +25,6 @@