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

Add hardening functionality #99

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add hardening functionality #99

wants to merge 4 commits into from

Conversation

sjpb
Copy link
Collaborator

@sjpb sjpb commented Aug 18, 2021

This uses the openstack ansible-hardening role to apply STIG security configurations to hosts in the hardening group. The environments/common/layouts/everything template used by cookiecutter puts the login group into the hardening group.

NB: This depends on PR #97.

The ansible-hardening role is run with default settings and the following additional changes are made to hosts in the hardening group:

  • "FIPS mode" for cryptography standards is enabled (ideally this should actually be enabled during system installation but this is clearly not possible using ansible).
  • A password is autogenerated for the centos user by the ansible/adhoc/generate-passwords.yml playbook and sudo rules are set for for centos and wheel groups to require a password. Note if other users have been added with sudo rights (e.g. via a pre- hook), they will not be affected and a warning will be generated by the ansible-hardning role.

Note that hosts in hardening will also have their sestatus set to enforcing, rather than the appliance default of permissive.

On a CentOS 8.4 system the ansible-hardening role will still generate warnings about:

  • Users without a home directory (cockpit-ws, cockpit-wsinstance, rngd are missing theirs - note the cockpit-* ones are not removed by removing the cockpit-ws package).
  • Various directories which should be on their own filesystem: /var, /var/log/audit, /tmp.
  • "Output from syslog must be sent to another server." (STIG V-72209).

@sjpb
Copy link
Collaborator Author

sjpb commented Aug 18, 2021

  • TODO: Need to check this can run MPI jobs OK with sestatus = enforcing
  • TODO: Add README

@sjpb
Copy link
Collaborator Author

sjpb commented Aug 18, 2021

Interestingly ansible/adhoc/tests.yml fails when login is in hardening node with:

package intel-... does not verify: no digest

The workaround is to set openhpc_slurm_login: "{{ groups['compute'][0] }} in the environment's openhpc_tests overrides.

@sjpb sjpb marked this pull request as draft August 25, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant