Page MenuHomeDevCentral

security.sls
No OneTemporary

security.sls

# -------------------------------------------------------------
# Salt — Provision OpenSearch
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% set config = salt['opensearch.get_config']() %}
# -------------------------------------------------------------
# Security plugin
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/opt/opensearch/plugins/opensearch-security/securityconfig/internal_users.yml:
file.managed:
- source: salt://roles/opensearch/opensearch/files/internal_users.yml.jinja
- user: opensearch
- group: opensearch
- mode: 600
- template: jinja
- show_changes: False
- context:
users:
{% for user, credential in config['users'].items() %}
{{ user }}:
username: {{ salt['credentials.get_username'](credential) }}
password: {{ salt['credentials.get_password'](credential) }}
{% endfor %}
opensearch_security_initialize:
cmd.script:
- source: salt://roles/opensearch/opensearch/files/security_initialize.sh
- args: {{ config['network_host'] }}
- env:
JAVA_HOME: /opt/opensearch/jdk
- creates: /opt/opensearch/plugins/opensearch-security/securityconfig/.initialized

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 28, 21:45 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2435808
Default Alt Text
security.sls (1 KB)

Event Timeline