Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature ssl tls #16

Merged
merged 7 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Kibana SSL for 7.11
  • Loading branch information
miromihaylov committed Mar 15, 2021
commit 02541fb7ca278f78c6abdbbcc3bdb45489938861
16 changes: 8 additions & 8 deletions tasks/kibana-ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,47 +78,47 @@
#Create KeyStore
- name: Check that Kibana keystore exists
stat:
path: "{{ kibana_data_dirs }}/kibana.keystore"
path: "{{ conf_dir }}/kibana.keystore"
register: keystore_exists
become: yes

- name: Create Kibana keystore
become: yes
shell: "{{ kibana_home }}/bin/kibana-keystore create --allow-root"
shell: "{{ kibana_home }}/bin/kibana-keystore create"
when: not keystore_exists.stat.exists
ignore_errors: yes
#Set keystore or certificate passwords
- name: Set Elasticsearch SSL Keystore Password
become: yes
shell: echo "{{ es_ssl_keystore_password }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.ssl.keystore.password --allow-root
shell: echo "{{ es_ssl_keystore_password }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.ssl.keystore.password
when: es_ssl_keystore_password and copy_es_keystore.changed
ignore_errors: yes

- name: Set Elasticsearch SSL Key Passphrase
become: yes
shell: echo "{{ es_ssl_key_passphrase }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.ssl.keyPassphrase --allow-root
shell: echo "{{ es_ssl_key_passphrase }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.ssl.keyPassphrase
when: es_ssl_key_passphrase and copy_es_certificates.changed
ignore_errors: yes

- name: Set Kibana Server SSL Keystore Password
become: yes
shell: echo "{{ server_ssl_keystore_password }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f server.ssl.keystore.password --allow-root
shell: echo "{{ server_ssl_keystore_password }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f server.ssl.keystore.password
when: server_ssl_keystore_password and (copy_server_keystore.changed or (es_kibana_same_keystore_or_cert and copy_es_keystore.changed))
ignore_errors: yes

- name: Set Kibana Server SSL Key Passphrase
become: yes
shell: echo "{{ server_ssl_key_passphrase }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f server.ssl.keyPassphrase --allow-root
shell: echo "{{ server_ssl_key_passphrase }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f server.ssl.keyPassphrase
when: server_ssl_key_passphrase and ( copy_server_certificates.changed or( es_kibana_same_keystore_or_cert and copy_es_certificates.changed))
ignore_errors: yes
#Add String settings to the Keystore
- name: Add Es useraname to Kibana keystore
become: yes
shell: echo "{{ es_user }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.username --allow-root
shell: echo "{{ es_user }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.username
when: secure_settings and es_user
ignore_errors: yes
- name: Add Es password to Kibana keystore
become: yes
shell: echo "{{ es_pass }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.password --allow-root
shell: echo "{{ es_pass }}" | {{ kibana_home }}/bin/kibana-keystore add -x -f elasticsearch.password
when: secure_settings and es_pass
ignore_errors: yes
2 changes: 1 addition & 1 deletion templates/kibana.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ elasticsearch.ssl.verificationMode: "{{ es_ssl_verification_mode }}"
{% endif %}

#OIDC configuration
{% if es_enable_oidc %}
{% if es_enable_oidc |bool == true %}
xpack.security.authc.providers:
oidc.oidc1:
order: 0
Expand Down