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

OCPBUGS-8347: Disable the check for scheduler's bind-address option, the option was removed from newer kuber versions #10377

Merged
merged 1 commit into from Apr 4, 2023

Conversation

jhrozek
Copy link
Collaborator

@jhrozek jhrozek commented Mar 27, 2023

Description:

  • Only enables the rule scheduler_no_bind_address on OCP releases where it can actually detect a security issue

Rationale:

The scheduler_no_bind_address option concerns exposing port 10251/TCP
of the scheduler to any other interface than localhost using the
bind-address parameter. The healthz service was running unauthenticated
on that port, so it was important that it is not bound to outside facing
interfaces.

However, the unsecure port option was removed completely in Kube
versions starting with 1.23:
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.23.md#deprecation
which means that the bind-address parameter is now safe to use.

And because OCP 4.9 is the last one to use kube 1.22:
https://access.redhat.com/solutions/4870701
and because OCP 4.8 is the oldest supported now, we can restrict this
rule to OCP 4.8 and 4.9.

Review Hints:

  • N/A

…the option was removed from newer kuber versions

The `scheduler_no_bind_address` option concerns exposing port 10251/TCP
of the scheduler to any other interface than localhost using the
bind-address parameter. The healthz service was running unauthenticated
on that port, so it was important that it is not bound to outside facing
interfaces.

However, the unsecure port option was removed completely in Kube
versions starting with 1.23:
    https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.23.md#deprecation
which means that the bind-address parameter is now safe to use.

And because OCP 4.9 is the last one to use kube 1.22:
    https://access.redhat.com/solutions/4870701
and because OCP 4.8 is the oldest supported now, we can restrict this
rule to OCP 4.8 and 4.9.
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@codeclimate
Copy link

codeclimate bot commented Mar 27, 2023

Code Climate has analyzed commit 778fae2 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 51.9% (0.0% change).

View more on Code Climate.

@marcusburghardt marcusburghardt added this to the 0.1.68 milestone Mar 28, 2023
@marcusburghardt marcusburghardt added the OpenShift OpenShift product related. label Mar 28, 2023
@jhrozek
Copy link
Collaborator Author

jhrozek commented Apr 3, 2023

/test e2e-aws-ocp4-cis
/test e2e-aws-ocp4-cis-node

@jhrozek
Copy link
Collaborator Author

jhrozek commented Apr 3, 2023

/test help

@openshift-ci
Copy link

openshift-ci bot commented Apr 3, 2023

@jhrozek: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test e2e-aws-ocp4-cis
  • /test e2e-aws-ocp4-cis-node
  • /test e2e-aws-ocp4-e8
  • /test e2e-aws-ocp4-high
  • /test e2e-aws-ocp4-high-node
  • /test e2e-aws-ocp4-moderate
  • /test e2e-aws-ocp4-moderate-node
  • /test e2e-aws-ocp4-pci-dss
  • /test e2e-aws-ocp4-pci-dss-node
  • /test e2e-aws-ocp4-stig
  • /test e2e-aws-ocp4-stig-node
  • /test e2e-aws-rhcos4-e8
  • /test e2e-aws-rhcos4-high
  • /test e2e-aws-rhcos4-moderate
  • /test images

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-ComplianceAsCode-content-master-images

In response to this:

/test help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jhrozek
Copy link
Collaborator Author

jhrozek commented Apr 3, 2023

/test e2e-aws-ocp4-cis

@jhrozek
Copy link
Collaborator Author

jhrozek commented Apr 3, 2023

/test e2e-aws-ocp4-cis-node

Copy link
Contributor

@Vincent056 Vincent056 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@jhrozek jhrozek merged commit 04b5cc9 into ComplianceAsCode:master Apr 4, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenShift OpenShift product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants