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
le-ya authored and poloz-lab committed Nov 12, 2024
1 parent e672982 commit 1601c38
Show file tree
Hide file tree
Showing 4 changed files with 7 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 @@ -31,6 +31,7 @@
},
],

$use_system_ca = false,
) {

# assign version according to the package manager
Expand Down
2 changes: 2 additions & 0 deletions manifests/filebeat_oss.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
$filebeat_fileuser = 'root',
$filebeat_filegroup = 'root',
$filebeat_path_certs = '/etc/filebeat/certs',

$use_system_ca = false,
) {

package { 'filebeat':
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,5 +12,7 @@ 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/wz-home

0 comments on commit 1601c38

Please sign in to comment.