Skip to content

Commit 76ecc19

Browse files
authored
Merge pull request #62 from stackhpc/prevent-ed25519
Prevent use of ed25519 SSH keys on Rocky 9
2 parents 105acb0 + 7228949 commit 76ecc19

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ansible/deploy-openstack-config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
- ssh_key_path | expanduser is exists
1818
fail_msg: "Could not find SSH key at {{ ssh_key_path | expanduser }}"
1919

20+
- name: Verify ssh public key exists
21+
ansible.builtin.assert:
22+
that:
23+
- (ssh_key_path ~ '.pub') | expanduser is exists
24+
fail_msg: "Could not find SSH key at {{ (ssh_key_path ~ '.pub') | expanduser }}"
25+
2026
- name: Verify vault password path has been set
2127
ansible.builtin.assert:
2228
that:
@@ -42,6 +48,15 @@
4248
gather_subset:
4349
- user_dir
4450

51+
# TODO: Remove this when Red Hat FIPS policy has been updated to allow ed25519 keys.
52+
# https://gitlab.com/gitlab-org/gitlab/-/issues/367429#note_1840422075
53+
- name: Verify ssh key is not ed25519
54+
ansible.builtin.assert:
55+
that:
56+
- "'ssh-ed25519' not in lookup('ansible.builtin.file', (ssh_key_path ~ '.pub') | expanduser)"
57+
fail_msg: "FIPS policy does not currently support ed25519 SSH keys on RHEL family systems"
58+
when: ansible_facts['os_family'] == "RedHat"
59+
4560
- name: Ensure git is present
4661
ansible.builtin.package:
4762
name: git

0 commit comments

Comments
 (0)