Kaynağa Gözat

Salt PKI fixes

tags/0.4
Ales Komarek 8 yıl önce
ebeveyn
işleme
ffbaaed24d
7 değiştirilmiş dosya ile 30 ekleme ve 5 silme
  1. +4
    -0
      salt/files/_acl.conf
  2. +6
    -0
      salt/files/_peer.conf
  3. +0
    -0
      salt/files/_pki.conf
  4. +15
    -1
      salt/master/service.sls
  5. +2
    -2
      salt/minion/ca.sls
  6. +1
    -1
      salt/minion/cert.sls
  7. +2
    -1
      tests/pillar/minion_pki_cert.sls

+ 4
- 0
salt/files/_acl.conf Dosyayı Görüntüle

@@ -0,0 +1,4 @@

peer:
.*:
- x509.sign_remote_certificate

+ 6
- 0
salt/files/_peer.conf Dosyayı Görüntüle

@@ -0,0 +1,6 @@
{% from "salt/map.jinja" import master with context %}

peer:
{%- for peer_name,peer_rules in master.peer.items() %}
{{ peer_name }}: {{ peer_rules }}
{%- endfor %}

salt/files/_signing_policies.conf → salt/files/_pki.conf Dosyayı Görüntüle


+ 15
- 1
salt/master/service.sls Dosyayı Görüntüle

@@ -15,6 +15,20 @@ salt_master_packages:
- watch_in:
- service: salt_master_service

{%- if master.peer is defined %}

/etc/salt/master.d/_peer.conf:
file.managed:
- source: salt://salt/files/_peer.conf
- user: root
- template: jinja
- require:
- pkg: salt_master_packages
- watch_in:
- service: salt_master_service

{%- endif %}

salt_master_service:
service.running:
- name: {{ master.service }}
@@ -26,4 +40,4 @@ salt_master_service:
- mode: 755
- makedirs: true

{%- endif %}
{%- endif %}

+ 2
- 2
salt/minion/ca.sls Dosyayı Görüntüle

@@ -4,9 +4,9 @@
include:
- salt.minion.service

/etc/salt/minion.d/_signing_policies.conf:
/etc/salt/minion.d/_pki.conf:
file.managed:
- source: salt://salt/files/_signing_policies.conf
- source: salt://salt/files/_pki.conf
- template: jinja
- require:
- pkg: salt_minion_packages

+ 1
- 1
salt/minion/cert.sls Dosyayı Görüntüle

@@ -16,7 +16,7 @@ include:

/etc/pki/cert/{{ cert.authority }}/{{ cert.common_name }}.crt:
x509.certificate_managed:
- ca_server: wst01.newt.cz
- ca_server: {{ cert.host }}
- signing_policy: {{ cert.authority }}
- public_key: /etc/pki/cert/{{ cert.authority }}/{{ cert.common_name }}.key
- CN: {{ cert.common_name }}

+ 2
- 1
tests/pillar/minion_pki_cert.sls Dosyayı Görüntüle

@@ -3,5 +3,6 @@ salt:
enabled: true
cert:
test_service:
host: minion.with.ca
authority: Company CA
common_name: test.service.domain.tld
common_name: test.service.domain.tld

Yükleniyor…
İptal
Kaydet