-
-
Notifications
You must be signed in to change notification settings - Fork 62
feat: starttls #558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: starttls #558
Changes from 7 commits
1db665f
e655530
65dd645
0dbf3ca
0aefff2
10a5006
98dc839
ca751e4
50e70e7
4d172e7
536578a
43ab883
fa30753
4d250dd
bcb7bf6
f2ab9c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,6 +1,12 @@ | ||||
include: | ||||
- .pebble | ||||
- .lego | ||||
|
||||
ssl-cert: | ||||
pkg.installed | ||||
|
||||
certbot: | ||||
pkg.installed | ||||
|
||||
{% for name in salt["pillar.get"]("tls:ca", {}) %} # " Syntax Hack | ||||
/etc/ssl/certs/{{ name }}.pem: | ||||
|
@@ -11,8 +17,21 @@ ssl-cert: | |||
- mode: "0644" | ||||
- require: | ||||
- pkg: ssl-cert | ||||
|
||||
/usr/local/share/ca-certificates/{{ name }}.crt: | ||||
file.managed: | ||||
- contents_pillar: tls:ca:{{ name }} | ||||
- user: root | ||||
- group: ssl-cert | ||||
- mode: "0644" | ||||
- require: | ||||
- pkg: ssl-cert | ||||
{% endfor %} | ||||
|
||||
/usr/sbin/update-ca-certificates: | ||||
cmd.wait: | ||||
- watch: | ||||
- file: /usr/local/share/ca-certificates/*.crt | ||||
|
||||
{% for name in salt["pillar.get"]("tls:certs", {}) %} # " Syntax Hack | ||||
/etc/ssl/private/{{ name }}.pem: | ||||
|
@@ -25,3 +44,91 @@ ssl-cert: | |||
- require: | ||||
- pkg: ssl-cert | ||||
{% endfor %} | ||||
|
||||
{% if salt["match.compound"](pillar["roles"]["salt-master"]["pattern"]) %} | ||||
# HTTP-validated domains | ||||
{% for domain in [ | ||||
'pypa.io', | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lists like these are always a good sign that something should be in pillar rather than a state. I'd suggest moving this list into a subkey of Line 4 in 7fcd4a3
Maybe Something like:
This would also simplify the logic in your pillar extension to allow us to determine where certs are validated (once dns is supported) and distributed. |
||||
'www.pycon.org', | ||||
'speed.pypy.org', | ||||
'salt-public.psf.io', | ||||
'planetpython.org', | ||||
'bugs.python.org' | ||||
] %} | ||||
{{ domain }}: | ||||
acme.cert: | ||||
- email: infrastructure-staff@python.org | ||||
- webroot: /etc/lego | ||||
- renew: 14 | ||||
{% if pillar["dc"] == "vagrant" %} | ||||
- server: https://salt-master.vagrant.psf.io:14000/dir | ||||
ewdurbin marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
{% endif %} | ||||
- require: | ||||
- sls: tls.lego | ||||
{% endfor %} | ||||
|
||||
# DNS-validated domains | ||||
# dns plugins do not exist yet for route53 & gandi | ||||
{#star.python.org:#} | ||||
{# acme.cert:#} | ||||
{# - aliases:#} | ||||
{# - python.org#} | ||||
{# - email: infrastructure-staff@python.org#} | ||||
{## - dns_plugin: route53#} | ||||
{## - dns_plugin_credentials: route53.python#} | ||||
{# - renew: 14#} | ||||
{# - server: https://localhost:14000/dir#} | ||||
{# - require:#} | ||||
{# - pkg: certbot#} | ||||
{# | ||||
- sls: tls.lego | ||||
{#star.pycon.org:#} | ||||
{# acme.cert:#} | ||||
{# - aliases:#} | ||||
{# - pycon.org#} | ||||
{# - email: infrastructure-staff@python.org#} | ||||
{## - dns_plugin: route53#} | ||||
{## - dns_plugin_credentials: route53.pycon#} | ||||
{# - renew: 14#} | ||||
{# - server: https://localhost:14000/dir#} | ||||
{# - require:#} | ||||
{# - sls: tls.lego#} | ||||
|
||||
{#star.pyfound.org:#} | ||||
{# acme.cert:#} | ||||
{# - aliases:#} | ||||
{# - pyfound.org#} | ||||
{# - email: infrastructure-staff@python.org#} | ||||
{## - dns_plugin: gandiv5#} | ||||
{## - dns_plugin_credentials: gandi#} | ||||
{# - renew: 14#} | ||||
{# - require:#} | ||||
{# - sls: tls.lego#} | ||||
|
||||
# Multi-domain certificates | ||||
{#jython.org:#} | ||||
{# acme.cert:#} | ||||
{# - aliases:#} | ||||
{# - www.jython.net#} | ||||
{# - jython.net#} | ||||
{# - www.jython.com#} | ||||
{# - jython.com#} | ||||
{# - email: infrastructure-staff@python.org#} | ||||
{# - webroot: /etc/lego#} | ||||
{# - renew: 14#} | ||||
{# - require:#} | ||||
{# - sls: tls.lego#} | ||||
{##} | ||||
{#bugs.python.org-multi:#} | ||||
{# acme.cert:#} | ||||
{# - name: bugs.python.org#} | ||||
{# - aliases:#} | ||||
{# - bugs.jython.org#} | ||||
{# - issues.roundup-tracker.org#} | ||||
{# - mail.roundup-tracker.org#} | ||||
{# - email: infrastructure-staff@python.org#} | ||||
{# - webroot: /etc/lego#} | ||||
{# - renew: 14#} | ||||
{# - require:#} | ||||
{# - sls: tls.lego#} | ||||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all a lot of work, when we could theoretically just assign certs explicitly to roles, see other comment.