Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# platform = multi_platform_ocp,multi_platform_rhcos
# reboot = false
# strategy = restrict
# complexity = low
# disruption = low
{{{ kubernetes_disable_sshd_config_option('GSSAPIAuthentication') }}}
---
{{{ kubernetes_disable_sshd_config_option_dropin('GSSAPIAuthentication') }}}
23 changes: 23 additions & 0 deletions shared/macros/10-kubernetes.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,29 @@ spec:
{{{ kubernetes_machine_config_file(path='/etc/ssh/sshd_config.d/' + config_basename, file_permissions_mode='0600', source=sshd_dropin_content, ocp_version_range=ocp_version_range) }}}
{{%- endmacro -%}}

{{#
Disable SSH options in existing configuration files.

GSSAPI authentication is enabled by default in
`/etc/ssh/sshd_config.d/50-redhat.conf`. Using a drop-in file for another
parameter in the same directory breaks the rule. Even if the drop-in file is
placed correctly, and disables the GSSAPI, the rule still detects that there
is a string in `/etc/ssh/sshd_config.d/50-redhat.conf` that has
`GSSAPIAuthentication yes`.

We need this specific macro so that we can override the setting in
`/etc/ssh/sshd_config.d/50-redhat.conf` on 4.13+ and `/etc/ssh/sshd_config` on
4.12.

#}}
{{%- macro kubernetes_disable_sshd_config_option(parameter) -%}}
{{{ kubernetes_machine_config_file(path='/etc/ssh/sshd_config', file_permissions_mode='0600', source=parameter + ' no' , ocp_version_range='<4.13.0') }}}
{{%- endmacro -%}}

{{%- macro kubernetes_disable_sshd_config_option_dropin(parameter) -%}}
{{{ kubernetes_machine_config_file(path='/etc/ssh/sshd_config.d/50-redhat.conf', file_permissions_mode='0600', source=parameter + ' no' , ocp_version_range='>=4.13.0') }}}
{{%- endmacro -%}}


{{% macro usbguard_config_source() %}}
#
Expand Down
Loading