mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
change how key is added
This commit is contained in:
@@ -240,6 +240,7 @@
|
||||
|
||||
{% if KIBANA and grains.role in ['so-eval', 'so-manager', 'so-standalone', 'so-managersearch', 'so-import'] %}
|
||||
{% do allowed_states.append('kibana') %}
|
||||
{% do allowed_states.append('kibana.secrets') %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains.role in ['so-eval', 'so-standalone', 'so-node', 'so-managersearch', 'so-heavynode', 'so-manager'] %}
|
||||
|
||||
@@ -6,4 +6,8 @@
|
||||
{% do KIBANACONFIG.kibana.config.update({'xpack': {'security': {'authc': {'providers': {'anonymous': {'anonymous1': {'order': 0, 'credentials': 'elasticsearch_anonymous_user'}}}}}}}) %}
|
||||
{% endif %}
|
||||
|
||||
{% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/kibana/secrets.sls') %}
|
||||
{% do KIBANACONFIG.kibana.config.update({'xpack': {'encryptedSavedObjects': {'encryptionKey': pillar['kibana']['secrets']['encryptedSavedObjects']['encryptionKey'] }}}) %}
|
||||
{% endif %}
|
||||
|
||||
{% set KIBANACONFIG = salt['pillar.get']('kibana:config', default=KIBANACONFIG.kibana.config, merge=True) %}
|
||||
|
||||
@@ -30,5 +30,3 @@ kibana:
|
||||
xpack:
|
||||
ml:
|
||||
enabled: False
|
||||
encryptedSavedObjects:
|
||||
encryptionKey: {{ pillar['kibana']['secrets']['encryptedSavedObjects']['encryptionKey'] }}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||
{% if sls in allowed_states %}
|
||||
|
||||
{% set kibana_encryptedSavedObjects_encryptionKey = salt['pillar.get']('kibana:secrets:encryptedSavedObjects:encryptionKey', salt['random.get_str'](72)) %}
|
||||
|
||||
kibana_pillar_directory:
|
||||
@@ -15,3 +18,11 @@ kibana_secrets_pillar:
|
||||
encryptedSavedObjects:
|
||||
encryptionKey: {{ kibana_encryptedSavedObjects_encryptionKey }}
|
||||
- show_changes: False
|
||||
|
||||
{% else %}
|
||||
|
||||
{{sls}}_state_not_allowed:
|
||||
test.fail_without_changes:
|
||||
- name: {{sls}}_state_not_allowed
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user