fix allowed states for ca

This commit is contained in:
Josh Patterson
2025-12-12 18:23:29 -05:00
parent 1475f0fc2f
commit 38f38e2789
4 changed files with 14 additions and 15 deletions

View File

@@ -24,7 +24,7 @@
{% set manager_states = [ {% set manager_states = [
'salt.master', 'salt.master',
'ca', 'ca.server',
'pcap.ca', 'pcap.ca',
'registry', 'registry',
'manager', 'manager',

View File

@@ -3,20 +3,10 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
include: include:
{% if GLOBALS.is_manager %} {% if GLOBALS.is_manager %}
- ca.server - ca.server
{% endif %}
- ca.trustca
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %} {% endif %}
- ca.trustca

View File

@@ -3,6 +3,7 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
pki_private_key: pki_private_key:
@@ -51,3 +52,11 @@ cakeyperms:
- name: /etc/pki/ca.key - name: /etc/pki/ca.key
- mode: 640 - mode: 640
- group: 939 - group: 939
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -3,7 +3,7 @@
# https://securityonion.net/license; you may not use this file except in compliance with the # https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0. # Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
cacertdir: cacertdir:
file.directory: file.directory: