mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
update license
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -131,9 +131,10 @@ if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
|
|||||||
# Since output can be KAFKA or LOGSTASH, we need to check if the policy set as default matches the value set in GLOBALS.pipeline and update if needed
|
# Since output can be KAFKA or LOGSTASH, we need to check if the policy set as default matches the value set in GLOBALS.pipeline and update if needed
|
||||||
printf "Checking if the correct output policy is set as default\n"
|
printf "Checking if the correct output policy is set as default\n"
|
||||||
OUTPUT_DEFAULT=$(jq -r '.item.is_default' <<< $RAW_JSON)
|
OUTPUT_DEFAULT=$(jq -r '.item.is_default' <<< $RAW_JSON)
|
||||||
if [ "$OUTPUT_DEFAULT" = "false" ]; then
|
OUTPUT_DEFAULT_MONITORING=$(jq -r '.item.is_default_monitoring' <<< $RAW_JSON)
|
||||||
|
if [[ "$OUTPUT_DEFAULT" = "false" || "$OUTPUT_DEFAULT_MONITORING" = "false" ]]; then
|
||||||
printf "Default output policy needs to be updated.\n"
|
printf "Default output policy needs to be updated.\n"
|
||||||
{%- if GLOBALS.pipeline == "KAFKA" %}
|
{%- if GLOBALS.pipeline == "KAFKA" and 'gmd' in salt['pillar.get']('features', []) %}
|
||||||
update_kafka_outputs
|
update_kafka_outputs
|
||||||
{%- else %}
|
{%- else %}
|
||||||
update_logstash_outputs
|
update_logstash_outputs
|
||||||
@@ -145,7 +146,7 @@ if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
|
|||||||
else
|
else
|
||||||
printf "\nHashes don't match - update needed.\n"
|
printf "\nHashes don't match - update needed.\n"
|
||||||
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
|
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
|
||||||
{%- if GLOBALS.pipeline == "KAFKA" %}
|
{%- if GLOBALS.pipeline == "KAFKA" and 'gmd' in salt['pillar.get']('features', []) %}
|
||||||
update_kafka_outputs
|
update_kafka_outputs
|
||||||
{%- else %}
|
{%- else %}
|
||||||
update_logstash_outputs
|
update_logstash_outputs
|
||||||
|
|||||||
@@ -14,3 +14,11 @@ so-kafka_so-status.disabled:
|
|||||||
file.comment:
|
file.comment:
|
||||||
- name: /opt/so/conf/so-status/so-status.conf
|
- name: /opt/so/conf/so-status/so-status.conf
|
||||||
- regex: ^so-kafka$
|
- regex: ^so-kafka$
|
||||||
|
|
||||||
|
{% if grains.role in ['so-manager','so-managersearch','so-standalone'] %}
|
||||||
|
ensure_default_pipeline:
|
||||||
|
cmd.run:
|
||||||
|
- name: |
|
||||||
|
/usr/sbin/so-yaml.py replace /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls kafka.enabled False;
|
||||||
|
/usr/sbin/so-yaml.py replace /opt/so/saltstack/local/pillar/global/soc_global.sls global.pipeline REDIS
|
||||||
|
{% endif %}
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
# Elastic License 2.0.
|
# Elastic License 2.0.
|
||||||
|
|
||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
|
include:
|
||||||
|
- elasticfleet.enabled
|
||||||
|
|
||||||
{# Create Kafka output policy if it doesn't exist #}
|
{# Create Kafka output policy if it doesn't exist #}
|
||||||
update_kafka_output_policy_script:
|
update_kafka_output_policy_script:
|
||||||
|
|||||||
@@ -2,12 +2,19 @@
|
|||||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||||
# 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.
|
||||||
|
#
|
||||||
|
# Note: Per the Elastic License 2.0, the second limitation states:
|
||||||
|
#
|
||||||
|
# "You may not move, change, disable, or circumvent the license key functionality
|
||||||
|
# in the software, and you may not remove or obscure any functionality in the
|
||||||
|
# software that is protected by the license key."
|
||||||
|
|
||||||
{% from 'allowed_states.map.jinja' import allowed_states %}
|
{% from 'allowed_states.map.jinja' import allowed_states %}
|
||||||
{% if sls.split('.')[0] in allowed_states %}
|
{% if sls.split('.')[0] in allowed_states %}
|
||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
{% from 'docker/docker.map.jinja' import DOCKER %}
|
{% from 'docker/docker.map.jinja' import DOCKER %}
|
||||||
{% set KAFKANODES = salt['pillar.get']('kafka:nodes') %}
|
{% set KAFKANODES = salt['pillar.get']('kafka:nodes') %}
|
||||||
|
{% if 'gmd' in salt['pillar.get']('features', []) %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- elasticsearch.ca
|
- elasticsearch.ca
|
||||||
@@ -59,6 +66,19 @@ delete_so-kafka_so-status.disabled:
|
|||||||
- name: /opt/so/conf/so-status/so-status.conf
|
- name: /opt/so/conf/so-status/so-status.conf
|
||||||
- regex: ^so-kafka$
|
- regex: ^so-kafka$
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{{sls}}_no_license_detected:
|
||||||
|
test.fail_without_changes:
|
||||||
|
- name: {{sls}}_no_license_detected
|
||||||
|
- comment:
|
||||||
|
- "Kafka for Guaranteed Message Delivery is a feature supported only for customers with a valid license.
|
||||||
|
Contact Security Onion Solutions, LLC via our website at https://securityonionsolutions.com
|
||||||
|
for more information about purchasing a license to enable this feature."
|
||||||
|
include:
|
||||||
|
- kafka.disabled
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{{sls}}_state_not_allowed:
|
{{sls}}_state_not_allowed:
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||||
# 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.
|
||||||
|
#
|
||||||
|
# Note: Per the Elastic License 2.0, the second limitation states:
|
||||||
|
#
|
||||||
|
# "You may not move, change, disable, or circumvent the license key functionality
|
||||||
|
# in the software, and you may not remove or obscure any functionality in the
|
||||||
|
# software that is protected by the license key."
|
||||||
|
|
||||||
{% from 'kafka/map.jinja' import KAFKAMERGED %}
|
{% from 'kafka/map.jinja' import KAFKAMERGED %}
|
||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
|
|||||||
Reference in New Issue
Block a user