mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-05-05 02:48:21 +02:00
changes for script to auth to elastic
This commit is contained in:
+19
-4
@@ -1,8 +1,11 @@
|
||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||
|
||||
{% if sls in allowed_states %}
|
||||
{% set ELASTICUSER = salt['pillar.get']('elasticsearch:auth:user', '' ) %}
|
||||
{% set ELASTICPASS = salt['pillar.get']('elasticsearch:auth:pass', '' ) %}
|
||||
|
||||
# This state is for checking things
|
||||
{% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] %}
|
||||
{% if grains['role'] in ['so-manager', 'so-managersearch', 'so-standalone'] %}
|
||||
# Make sure Cross Cluster is good. Will need some logic once we have hot/warm
|
||||
crossclusterson:
|
||||
cmd.script:
|
||||
@@ -11,9 +14,15 @@ crossclusterson:
|
||||
- runas: socore
|
||||
- source: salt://utility/bin/crossthestreams
|
||||
- template: jinja
|
||||
- defaults:
|
||||
ELASTICCURL: "curl"
|
||||
{% if salt['pillar.get']('elasticsearch:auth_enabled', False) %}
|
||||
- context:
|
||||
ELASTICCURL: "curl --user {{ELASTICUSER}}:{{ELASTICPASS}}"
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% if grains['role'] in ['so-eval', 'so-import'] %}
|
||||
{% endif %}
|
||||
{% if grains['role'] in ['so-eval', 'so-import'] %}
|
||||
fixsearch:
|
||||
cmd.script:
|
||||
- shell: /bin/bash
|
||||
@@ -21,7 +30,13 @@ fixsearch:
|
||||
- runas: socore
|
||||
- source: salt://utility/bin/eval
|
||||
- template: jinja
|
||||
{% endif %}
|
||||
- defaults:
|
||||
ELASTICCURL: "curl"
|
||||
{% if salt['pillar.get']('elasticsearch:auth_enabled', False) %}
|
||||
- context:
|
||||
ELASTICCURL: "curl --user {{ELASTICUSER}}:{{ELASTICPASS}}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user