Add new stack certificate authority based on new CA implemetation
The CA python egg is here: https://lab.nexedi.com/vpelletier/caucase instance-certificate-authority.cfg.jinja2.in deploy a CA server which expose an API on HTTP, all request are done using GET, PUT, DELETE and POST on that API. Auth server is an apache httpd which validate client certificate for authentification. It autmatically request a signed certificate to CA and use it in apache configuration. client request will be validated using: SSLVerifyClient require in apache config
[buildout] | ||
extends = | ||
../../component/apache/buildout.cfg | ||
../../component/nginx/buildout.cfg | ||
|
||
../../component/curl/buildout.cfg | ||
../../component/dash/buildout.cfg | ||
../../component/dcron/buildout.cfg | ||
../../component/openssl/buildout.cfg | ||
|
||
../../component/gzip/buildout.cfg | ||
../../component/lxml-python/buildout.cfg | ||
../../component/pycurl/buildout.cfg | ||
../../component/python-cryptography/buildout.cfg | ||
../../stack/logrotate/buildout.cfg | ||
parts = | ||
template-logrotate-base | ||
[extra-eggs] | ||
recipe = zc.recipe.egg | ||
interpreter = python.ca | ||
eggs = | ||
gunicorn # for WSGI HTTP Server | ||
futures | ||
certificate.authority | ||
plone.recipe.command | ||
collective.recipe.template | ||
[template-ca-download-base] | ||
recipe = hexagonit.recipe.download | ||
ignore-existing = true | ||
download-only = true | ||
url = ${:_profile_base_location_}/template/${:filename} | ||
mode = 0644 | ||
[template-httpd-auth-conf] | ||
<= template-ca-download-base | ||
md5sum = ea445b0a9b143d12b5700a71ac06293c | ||
|
||
filename = template-httpd-auth.conf.in | ||
[template-nginx-ca-conf] | ||
<= template-ca-download-base | ||
md5sum = 97d8dbcdfcca92a3c2b70634f0dee8d9 | ||
filename = ca-nginx.conf.in | ||
[template-authenticated-server] | ||
recipe = slapos.recipe.template:jinja2 | ||
|
||
filename = template-authenticated-server.cfg | ||
template = ${:_profile_base_location_}/instance-auth-server.cfg.jinja2.in | ||
rendered = ${buildout:directory}/template-authenticated-server.cfg | ||
md5sum = 39c1494b45dcbd5388b0d1c1d9b27ffb | ||
context = | ||
key apache_location apache:location | ||
key gzip_location gzip:location | ||
key template_logrotate_base template-logrotate-base:rendered | ||
raw certificate_request_bin ${buildout:directory}/bin/ca-cliweb | ||
raw curl_executable_location ${curl:location}/bin/curl | ||
raw dash_executable_location ${dash:location}/bin/dash | ||
raw dcron_executable_location ${dcron:location}/sbin/crond | ||
raw slapos_kill_bin ${buildout:directory}/bin/slapos-kill | ||
raw template_httpd_auth_conf ${template-httpd-auth-conf:location}/${template-httpd-auth-conf:filename} | ||
raw openssl_executable_location ${openssl:location}/bin/openssl | ||
raw python_executable ${buildout:directory}/bin/${extra-eggs:interpreter} | ||
[template-certificate-authority] | ||
recipe = slapos.recipe.template:jinja2 | ||
filename = template-certificate-authority.cfg | ||
template = ${:_profile_base_location_}/instance-certificate-authority.cfg.jinja2.in | ||
rendered = ${buildout:directory}/template-certificate-authority.cfg | ||
md5sum = d5139f650388256776f43b9026617564 | ||
context = | ||
key ngix_location nginx:location | ||
key template_logrotate_base template-logrotate-base:rendered | ||
raw curl_executable_location ${curl:location}/bin/curl | ||
raw certificate_authority_bin ${buildout:directory}/bin/ca-bin | ||
raw template_nginx_ca_conf ${template-nginx-ca-conf:location}/${template-nginx-ca-conf:filename} | ||
raw dash_executable_location ${dash:location}/bin/dash | ||
raw gunicorn_bin ${buildout:directory}/bin/gunicorn | ||
raw openssl_executable_location ${openssl:location}/bin/openssl | ||
raw python_bin ${buildout:directory}/bin/${extra-eggs:interpreter} | ||
raw eggs_directory ${buildout:eggs-directory} | ||
raw develop_eggs_directory ${buildout:develop-eggs-directory} |
-
Overall looks good (modulo questions for what I noticed and could not understand).I did not review nginx & apache configuratoins seriously (because I am bad at configuring apache and I never configured nginx).
Once (usual) issue I have with slapos: there is so much duplication betwen SRs... Especially, these cipher suites duplicated everywhere are annoying: the day this value becomes considered unsafe, we have many places to fix.
-
Ah, and something else, which is also a common issue I have with slapos: I do not know how easy it will be for other SRs (ex: ERP5) to reuse these. You may want to check what julien did for neo SR, as it is extended by ERP5.
-
...and I should also add that I like that you use overall very few distinct recipes, and all of them are also used by other SRs. This is how I expect recipes to be used, thanks !