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

Read-only root file system #2178

Merged

Conversation

2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Dec 21, 2023

Add readOnlyRootFilesystem to our Deployments and StatefulSets. Why? Cause it's more securer.

One thing I needed to do to make this work was to add a volume for /tmp, which I guess is by default part of /. This resulted in an actual problem in hive-controllers creating a Session for AWS... but I did it for all the things just in case.

This scares me a little bit. For one thing, any time we mess with securityContexts we seem to break our friends running hive under vanilla k8s. But also, who knows what corner cases are expecting to be able to write somewhere in the root file system? We won't find out if, like, trying to use additional certs under OpenStack is a problem until some customer tries it.

HIVE-2350

Add `readOnlyRootFilesystem` to our Deployments and StatefulSets. Why?
Cause it's more securer.

One thing I needed to do to make this work was to add a volume for
`/tmp`, which I guess is by default part of `/`. This resulted in an
actual problem in hive-controllers creating a Session for AWS... but I
did it for all the things just in case.

This scares me a little bit. For one thing, any time we mess with
`securityContext`s we seem to break our friends running hive under
vanilla k8s. But also, who knows what corner cases are expecting to be
able to write somewhere in the root file system? We won't find out if,
like, trying to use additional certs under OpenStack is a problem until
some customer tries it.

HIVE-2350
@2uasimojo
Copy link
Member Author

/hold for testing and risk assessment

/test e2e-gcp
/test e2e-azure

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 21, 2023
@openshift-ci openshift-ci bot requested review from abutcher and dlom December 21, 2023 22:09
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 21, 2023
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad99b9e) 57.75% compared to head (dc7d630) 57.75%.
Report is 15 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2178   +/-   ##
=======================================
  Coverage   57.75%   57.75%           
=======================================
  Files         187      187           
  Lines       25984    25984           
=======================================
  Hits        15006    15006           
  Misses       9723     9723           
  Partials     1255     1255           

@2uasimojo
Copy link
Member Author

/test security

just to make sure we didn't pick up any others before I fix this

@2uasimojo
Copy link
Member Author

2uasimojo commented Jan 9, 2024

Glad I checked. Resolving the two new vulns via HIVE-2398 / #2180.

@2uasimojo
Copy link
Member Author

/test security

Copy link

@ngraham20 ngraham20 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2024
Copy link
Contributor

openshift-ci bot commented Jan 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, ngraham20

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@2uasimojo
Copy link
Member Author

/hold cancel

🤞

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 1, 2024
@2uasimojo
Copy link
Member Author

/override ci/prow/security

Same low-sev, not-yet-fixed vuln we've been tracking.

Copy link
Contributor

openshift-ci bot commented Feb 1, 2024

@2uasimojo: Overrode contexts on behalf of 2uasimojo: ci/prow/security

In response to this:

/override ci/prow/security

Same low-sev, not-yet-fixed vuln we've been tracking.

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.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 5fbe0d1 and 2 for PR HEAD dc7d630 in total

Copy link
Contributor

openshift-ci bot commented Feb 1, 2024

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 194c4d4 into openshift:master Feb 1, 2024
11 checks passed
@2uasimojo 2uasimojo deleted the HIVE-2350/secure-deployments branch February 1, 2024 23:33
@2uasimojo
Copy link
Member Author

/cherry-pick mce-2.5

@openshift-cherrypick-robot

@2uasimojo: new pull request created: #2195

In response to this:

/cherry-pick mce-2.5

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants