Skip to content

Commit

Permalink
Add possibility to use system CA
Browse files Browse the repository at this point in the history
  • Loading branch information
poloz-lab committed Aug 4, 2022
1 parent 0cecd38 commit bd4f014
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/dashboard.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
],

$manage_certs = true,
$use_system_ca = false,
) {
# assign version according to the package manager
case $facts['os']['family'] {
Expand Down
1 change: 1 addition & 0 deletions manifests/filebeat_oss.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
$filebeat_path_certs = '/etc/filebeat/certs',

$manage_certs = true,
$use_system_ca = false,
) {
include wazuh::repo_elastic_oss

Expand Down
2 changes: 2 additions & 0 deletions templates/filebeat_oss_yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ output.elasticsearch:
username: <%= @filebeat_oss_elastic_user %>
password: <%= @filebeat_oss_elastic_password %>
protocol: https
<% if not @use_system_ca -%>
ssl.certificate_authorities:
- /etc/filebeat/certs/root-ca.pem
<% end -%>
ssl.certificate: "/etc/filebeat/certs/filebeat.pem"
ssl.key: "/etc/filebeat/certs/filebeat-key.pem"

Expand Down
2 changes: 2 additions & 0 deletions templates/wazuh_dashboard_yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ opensearch_security.readonly_mode.roles: ["kibana_read_only"]
server.ssl.enabled: true
server.ssl.key: "<%= @dashboard_path_certs %>/dashboard-key.pem"
server.ssl.certificate: "<%= @dashboard_path_certs %>/dashboard.pem"
<% if not @use_system_ca -%>
opensearch.ssl.certificateAuthorities: ["<%= @dashboard_path_certs %>/root-ca.pem"]
<% end -%>
uiSettings.overrides.defaultRoute: /app/wazuh

0 comments on commit bd4f014

Please sign in to comment.