When running OpenShift with Red Hat supported network types, applications in the cluster are blocked from sending traffic to ports 22623 or 22624 via iptables rules injected into the pod. This ensures that no unprivileged workloads are able to access the Machine Config Server (MCS) and download ignition configuration, which may contain sensitive information. Unfortunately, this security measure is implemented within the code for the network plugins, so a cluster that uses another network plugin (like Calico, for example), would not have this protection mechanism in place. In other words, all applications running on OpenShift clusters not using Red Hat supported network types will be able to access the MCS.
Statement: This flaw is planned to be addressed in a future enhancement: https://issues.redhat.com/browse/GRPA-3642
Mitigation: - If deployed on Baremetal, OpenStack, Ovirt, Vsphere or KubeVirt, check if the ignition config is accessible from outside the cluster, e.g. https://api.$cluster_name.$base_domain:22623/config/worker Prevent access to this endpoint with an external firewall or load balancer. - To protect the MCS endpoint within clusters, use a supported network plugin with OpenShift, namely: OpenShift SDN, OVN Kubernetes or kuryr. - Ensure untrusted workloads are not run with hostNetwork access.
Cluster types allowing external access to ignition config: https://github.com/openshift/installer/blob/master/pkg/asset/ignition/machine/node.go#L36..L46
Upstream issue: https://github.com/openshift/okd/issues/176