mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #5813 from Security-Onion-Solutions/macleod
Highlander changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
. /usr/sbin/so-common
|
. /usr/sbin/so-common
|
||||||
|
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
||||||
wait_for_web_response "http://localhost:5601/app/kibana" "Elastic" 300 "{{ ELASTICCURL }}"
|
wait_for_web_response "http://localhost:5601/app/kibana" "Elastic" 300 "{{ ELASTICCURL }}"
|
||||||
## This hackery will be removed if using Elastic Auth ##
|
## This hackery will be removed if using Elastic Auth ##
|
||||||
|
|
||||||
@@ -9,5 +9,9 @@ SESSIONCOOKIE=$({{ ELASTICCURL }} -c - -X GET http://localhost:5601/ | grep sid
|
|||||||
# Disable certain Features from showing up in the Kibana UI
|
# Disable certain Features from showing up in the Kibana UI
|
||||||
echo
|
echo
|
||||||
echo "Setting up default Space:"
|
echo "Setting up default Space:"
|
||||||
|
{% if HIGHLANDER %}
|
||||||
|
{{ ELASTICCURL }} -b "sid=$SESSIONCOOKIE" -L -X PUT "localhost:5601/api/spaces/space/default" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d' {"id":"default","name":"Default","disabledFeatures":["enterpriseSearch"]} ' >> /opt/so/log/kibana/misc.log
|
||||||
|
{% else %}
|
||||||
{{ ELASTICCURL }} -b "sid=$SESSIONCOOKIE" -L -X PUT "localhost:5601/api/spaces/space/default" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d' {"id":"default","name":"Default","disabledFeatures":["ml","enterpriseSearch","siem","logs","infrastructure","apm","uptime","monitoring","stackAlerts","actions","fleet"]} ' >> /opt/so/log/kibana/misc.log
|
{{ ELASTICCURL }} -b "sid=$SESSIONCOOKIE" -L -X PUT "localhost:5601/api/spaces/space/default" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d' {"id":"default","name":"Default","disabledFeatures":["ml","enterpriseSearch","siem","logs","infrastructure","apm","uptime","monitoring","stackAlerts","actions","fleet"]} ' >> /opt/so/log/kibana/misc.log
|
||||||
|
{% endif %}
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG with context %}
|
{% import_yaml 'elasticsearch/defaults.yaml' as ESCONFIG with context %}
|
||||||
|
{% set HIGHLANDER = salt['pillar.get']('global:highlander', False) %}
|
||||||
|
|
||||||
{% if not salt['pillar.get']('elasticsearch:auth:enabled', False) %}
|
{% if not salt['pillar.get']('elasticsearch:auth:enabled', False) %}
|
||||||
{% do ESCONFIG.elasticsearch.config.xpack.security.authc.anonymous.update({'username': 'anonymous_user', 'roles': 'superuser', 'authz_exception': 'true'}) %}
|
{% do ESCONFIG.elasticsearch.config.xpack.security.authc.anonymous.update({'username': 'anonymous_user', 'roles': 'superuser', 'authz_exception': 'true'}) %}
|
||||||
@@ -8,6 +9,9 @@
|
|||||||
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
{% if grains.id.split('_') | last in ['manager','managersearch'] %}
|
||||||
{% if salt['pillar.get']('nodestab', {}) %}
|
{% if salt['pillar.get']('nodestab', {}) %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['master', 'data', 'remote_cluster_client']}) %}
|
||||||
|
{% if HIGHLANDER %}
|
||||||
|
{% do ESCONFIG.elasticsearch.config.node.roles.append('ml') %}
|
||||||
|
{% endif %}
|
||||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
||||||
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
{% for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||||
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(SN.split('_')|first) %}
|
{% do ESCONFIG.elasticsearch.config.discovery.seed_hosts.append(SN.split('_')|first) %}
|
||||||
@@ -18,9 +22,15 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
{% do ESCONFIG.elasticsearch.config.node.update({'roles': ['data', 'ingest']}) %}
|
||||||
|
{% if HIGHLANDER %}
|
||||||
|
{% do ESCONFIG.elasticsearch.config.node.roles.extend(['ml', 'master']) %}
|
||||||
|
{% endif %}
|
||||||
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
{% do ESCONFIG.elasticsearch.config.node.attr.update({'box_type': 'hot'}) %}
|
||||||
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
{% do ESCONFIG.elasticsearch.config.update({'discovery': {'seed_hosts': [grains.master]}}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if HIGHLANDER %}
|
||||||
|
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
|
||||||
|
|||||||
@@ -1668,6 +1668,10 @@ manager_global() {
|
|||||||
" url_base: '$REDIRECTIT'"\
|
" url_base: '$REDIRECTIT'"\
|
||||||
" managerip: '$MAINIP'" > "$global_pillar"
|
" managerip: '$MAINIP'" > "$global_pillar"
|
||||||
|
|
||||||
|
if [[ $HIGHLANDER == 'True' ]]; then
|
||||||
|
printf '%s\n'\
|
||||||
|
" highlander: True"\ >> "$global_pillar"
|
||||||
|
fi
|
||||||
if [[ $is_airgap ]]; then
|
if [[ $is_airgap ]]; then
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
" airgap: True"\ >> "$global_pillar"
|
" airgap: True"\ >> "$global_pillar"
|
||||||
|
|||||||
Reference in New Issue
Block a user