Skip to content

Commit

Permalink
tests(gorgone): add more vault test in automated tests
Browse files Browse the repository at this point in the history
Refs:MON-106121
  • Loading branch information
Evan-Adam committed Nov 26, 2024
1 parent b1e81e6 commit 8b3fc53
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ centreon:
db_configuration:
dsn: "mysql:host=localhost:port=3306;dbname=centreon"
username: "centreon"
password: "password"
password: "secret::hashicorp_vault::SecretPathArg::secretNameFromApiResponse"
db_realtime:
dsn: "mysql:host=localhost:port=3306;dbname=centreon_storage"
username: "centreon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gorgone:
- name: centreonv2
base_url: "http://127.0.0.1/centreon/api/latest/"
username: "centreon-gorgone"
password: "webapiPassword!"
password: "secret::hashicorp_vault::SecretPathArg::secretNameFromApiResponse"
- name: clapi
username: "centreon-gorgone"
password: "webapiPassword!"
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ gorgone:
package: "gorgone::modules::core::action::hooks"
enable: true
command_timeout: 30
whitelist_cmds: true
whitelist_cmds: secret::hashicorp_vault::SecretPathArg::secretNameFromApiResponse
allowed_cmds: !include whitelist.conf.d/*.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
- ^/usr/share/centreon/www/modules/centreon-dsm/+cron/centreon_dsm_purge\.pl --config=\"/etc/centreon/conf.pm\" --severity=\S+ >> /var/log/centreon-gorgone/centreon_dsm_purge\.log 2>&1\s*$
- ^/usr/share/centreon-bi-backup/centreon-bi-backup-web\.sh >> /var/log/centreon-gorgone/centreon-bi-backup-web\.log 2>&1$
- ^/usr/share/centreon/www/modules/centreon-autodiscovery-server/+cron/centreon_autodisco.pl --config='/etc/centreon/conf.pm' --config-extra='/etc/centreon/centreon_autodisco.pm' --severity=\S+ >> /var/log/centreon-gorgone/centreon_service_discovery.log 2>&1$
- secret::hashicorp_vault::SecretPathArg::secretNameFromApiResponse
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'database' => {
'db_configuration' => {
'dsn' => 'mysql:host=localhost:port=3306;dbname=centreon',
'password' => 'password',
'password' => 'VaultSentASecret',
'username' => 'centreon'
},
'db_realtime' => {
Expand All @@ -17,7 +17,7 @@
'gorgone' => {
'tpapi' => [
{
'password' => 'webapiPassword!',
'password' => 'VaultSentASecret',
'base_url' => 'http://127.0.0.1/centreon/api/latest/',
'name' => 'centreonv2',
'username' => 'centreon-gorgone'
Expand All @@ -36,7 +36,7 @@
'modules' => [
{
'package' => 'gorgone::modules::core::action::hooks',
'whitelist_cmds' => 'true',
'whitelist_cmds' => 'VaultSentASecret',
'command_timeout' => 30,
'allowed_cmds' => [
'^sudo\\s+(/bin/|/usr/bin/)?systemctl\\s+(reload|restart)\\s+(centengine|centreontrapd|cbd)\\s*$',
Expand All @@ -56,7 +56,8 @@
'^/usr/share/centreon/cron/dashboardBuilder --config=/etc/centreon/conf\\.pm >> /var/log/centreon-gorgone/dashboardBuilder\\.log 2>&1$',
'^/usr/share/centreon/www/modules/centreon-dsm/+cron/centreon_dsm_purge\\.pl --config=\\"/etc/centreon/conf.pm\\" --severity=\\S+ >> /var/log/centreon-gorgone/centreon_dsm_purge\\.log 2>&1\\s*$',
'^/usr/share/centreon-bi-backup/centreon-bi-backup-web\\.sh >> /var/log/centreon-gorgone/centreon-bi-backup-web\\.log 2>&1$',
'^/usr/share/centreon/www/modules/centreon-autodiscovery-server/+cron/centreon_autodisco.pl --config=\'/etc/centreon/conf.pm\' --config-extra=\'/etc/centreon/centreon_autodisco.pm\' --severity=\\S+ >> /var/log/centreon-gorgone/centreon_service_discovery.log 2>&1$'
'^/usr/share/centreon/www/modules/centreon-autodiscovery-server/+cron/centreon_autodisco.pl --config=\'/etc/centreon/conf.pm\' --config-extra=\'/etc/centreon/centreon_autodisco.pm\' --severity=\\S+ >> /var/log/centreon-gorgone/centreon_service_discovery.log 2>&1$',
'VaultSentASecret'
],
'name' => 'action',
'enable' => 'true'
Expand Down

0 comments on commit 8b3fc53

Please sign in to comment.