-
Notifications
You must be signed in to change notification settings - Fork 476
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
hostport registry: add NodeObservability hostnetwork ports #1245
hostport registry: add NodeObservability hostnetwork ports #1245
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
well, this PR is just documenting a decision that was/will be made elsewhere...
Being hostNetwork brings its own set of possible exploits. Especially if the pod in question also has |
@danwinship : Thanks a lot for taking a look at the PR!
Yes, the decision is supposed to be already taken, however I wanted to have a discussion with OCP network experts as we are also hesitating on this move. So, I thought that this can be well approached in the form of a PR.
That's exactly the question we asked ourselves. We are not quite sure that going Would you mind to showcase some potential (or maybe even the most common) exploits for a container which is using the host network? |
80797f3
to
dfc66e0
Compare
@alebedev87: 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. |
@danwinship: I found a good article which tries to rank (loosely but still educated) the most privileged options a container may have, it also provides examples of potential attack paths: Bad Pods: Kubernetes Pod Privilege Escalation. Looking at that article the choice between "privileged+hostPath" vs hostnetwork container is slightly biased towards the later. Taking into account the fact that the operator won't need any create/update/delete permissions on the SCC, I think that the least privileged is indeed the |
oh, I missed that it was privileged + host filesystem vs not privileged + hostNetwork. "Not privileged" always wins. |
/hold |
Inactive enhancement proposals go stale after 28d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Inactive enhancement proposals go stale after 28d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle stale |
@alebedev87: PR needs rebase. 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. |
Stale enhancement proposals rot after 7d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle rotten |
Rotten enhancement proposals close after 7d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Reopen the proposal by commenting /close |
@openshift-bot: Closed this PR. In response to this:
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. |
NodeObservability Operator is an add-on (off OCP payload) operator, it deploys an agent (
DaemonSet
) on the nodes which need to be observed. The observation is currently limited to CRIO and Kubelet profiling probes (standard golang pprof endpoints) which are triggered via the agent HTTPS endpoint: Operator --HTTPS--> Agent on the node --UnixDomainSocket/HTTPS--> CRIO/Kubelet pprof endpoint. The agent has been set as privileged container to be able to mount the unix domain socket of CRIO. Also, this led to a dedicated SCC with quite wide permissions (almost cluster-admin).The idea behind this PR is to reduce the cluster level permissions of NodeObservability Operator. This can be done by targeting the HTTPS CRIO pprof endpoint (instead of the socket). This needs the
hostnetwork
access as CRIO HTTPS pprof endpoint is bound onlocalhost
address and cannot receive traffic from the POD network namespace. The hostnetwork access enabled for NodeObservability Operator results in 2 occupied ports which we would like to make visible by creating this PR.Note:
9740
port can potentially be removed in the future, ifkube-rbac-proxy
will support proxying via unix domain socket.Any ideas/remarks are welcome!