Skip to content

Commit 775fc1d

Browse files
committed
Enable CIS benchmark hardening in AIO and Multinode
Currently we do not have coverage of this feature in CI.
1 parent f4d30a9 commit 775fc1d

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

doc/source/configuration/security-hardening.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,18 @@ whether or not workloads or API requests are affected by any configuration chang
4040
4141
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/cis.yml
4242
43+
Enabling the host configure hook
44+
--------------------------------
45+
46+
A hook is pre-installed but its execution is guarded by the
47+
``stackhpc_enable_cis_benchmark_hardening`` configuration option.
48+
If you want the hardening playbooks to run automatically, as part of
49+
host configure, simply set this flag to ``true``:
50+
51+
.. code-block:: yaml
52+
:caption: $KAYOBE_CONFIG_PATH/stackhpc.yml
53+
54+
stackhpc_enable_cis_benchmark_hardening: true
55+
56+
Alternatively, this can be toggled on a per-environment basis by
57+
setting it in an environment specific config file.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
stackhpc_enable_cis_benchmark_hardening: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
stackhpc_enable_cis_benchmark_hardening: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
3+
import_playbook: ../../../ansible/cis.yml
4+
when: stackhpc_enable_cis_benchmark_hardening | bool

etc/kayobe/stackhpc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,9 @@ stackhpc_docker_registry: "{{ pulp_url | regex_replace('^https?://', '') }}"
148148
# Username and password of container registry.
149149
stackhpc_docker_registry_username: "{{ pulp_username }}"
150150
stackhpc_docker_registry_password: "{{ pulp_password }}"
151+
152+
###############################################################################
153+
# Feature flags
154+
155+
# Whether or not to run CIS benchmark hardening playbooks
156+
stackhpc_enable_cis_benchmark_hardening: false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
features:
3+
- |
4+
Adds a hook to automatically run the CIS benchmark hardening playbooks as
5+
part of host configure. This is guarded by the
6+
``stackhpc_enable_cis_benchmark_hardening`` configuration option and is
7+
disabled by default.

0 commit comments

Comments
 (0)