From e81003a3883eb224a8186142e6d3ac25c9e43b40 Mon Sep 17 00:00:00 2001 From: Asier Gutierrez Date: Thu, 29 Dec 2022 22:37:53 +0800 Subject: [PATCH] Changed the wording in a number of points according to feedback --- .../3702-ima-namespace-support/README.md | 299 +----------------- 1 file changed, 16 insertions(+), 283 deletions(-) diff --git a/keps/sig-node/3702-ima-namespace-support/README.md b/keps/sig-node/3702-ima-namespace-support/README.md index 0496823c4f4..8afed007902 100644 --- a/keps/sig-node/3702-ima-namespace-support/README.md +++ b/keps/sig-node/3702-ima-namespace-support/README.md @@ -1,164 +1,5 @@ - - - - - # KEP-3702: IMA namespace support inside containers - - - - - - - - - - - - - [KEP-XXXXX: IMA namespace support inside containers](#kep-xxxxx-ima-namespace-support-inside-containers) - [Release Signoff Checklist](#release-signoff-checklist) - [Summary](#summary) @@ -191,46 +32,28 @@ tags, and then generate with `hack/update-toc.sh`. - - ## Release Signoff Checklist - - - - Items marked with (R) are required *prior to targeting to a milestone / release*. @@ -243,103 +66,72 @@ Items marked with (R) are required *prior to targeting to a milestone / release* [kubernetes/website]: https://git.k8s.io/website - ## Summary - +IMA namespaces allow to check the file integrity. This proposal adds regular file integrity inside containers deployed in kubernetes. -IMA namespaces allow to check the file integrity. This proposal adds file integrity inside containers deployed in kubernetes. - - - ## Motivation - - File integrity is a way to improve security in systems allowing to: * Detect illicit activity - * Detect unintended changes - * Verify the status and health of the system - * Comply with access rules - - This can be achieved using IMA (Integrity Measurement Architecture) and EVM (Extended Verification Module), which can use a TPM chip as Hardware Root of Trust for high security environments. - - ### Goals - - -* Allow IMA to work inside a container with remote attestation - - +* Check integrity of regular files inside containers, and hence check POD integrity +* Using remote attestation mechanism, check the integrity of a given POD or all PODS in the cluster deployed with IMA namespace enabled periodically +* Alert about corrupted or compromised pods ### Non-Goals - +. ## Proposal - -We propose to enable IMA linux namespaces in pods. + ### User Stories (Optional) - - #### Story 1 - As a cluster admin, I want to detect undesired file changes, so that I can take out pods that have been compromised. - +An intruder perform some malicious changes inside a certain pod's files. The system should be able to detect those changed and alert about the inconsistent pod. The remote attestation framework could keep this pod running or make a copy (for forensic analysis) and delete it. #### Story 2 - - As a cluster admin, I want to deploy a only proven and certified pods, so that I can comply with internal policies as well as security regulations. -#### Story 3 +Let's say that we are working in a high security environment where only approved images can be deployed. In this scenario we can make sure that the pod deploy used an imaged that hasn't been tampered. - +#### Story 3 As a cluster admin, I want to deny access to certain files inside the pod, so that a potential intruder can't access sensitive information. -### Notes/Constraints/Caveats (Optional) - - +In some cases, we should not even allow root to modify certain files inside the container. +### Notes/Constraints/Caveats (Optional) We need to enable IMA in the kernel and container runtimes (runC, CRI-O, docker, containerd, etc.). - ### Risks and Mitigations ## Design Details - In order for the this feature to work, the nodes where the pods will be deploy should have IMA enabled and a recent kernel that supports IMA namespaces (WIP, it should be merged soon). The nodes should also have a TPM chip. We could use nodAffinity of labels and annotations in nodes in order to select where to deploy the pods. @@ -363,29 +155,10 @@ IMA is only available in Linux hosts and Linux containers. Unfortunately, IMA is ### Runtime specification -In order to run a container we need a bundle that contains a config.json file with all the configuration. There is a Linux specific configuration section where the namespaces are listed. According to the standard, the following namespace types SHOULD be supported. - - - -* pid - -* network - -* mount - -* ipc - -* uts - -* user +There is an ongoing discussion regarding the runtime changes. -* cgroup - - - -We suggest to add a new namespaces, initially as a OPTIONAL type, in order to keep the backward compatibility. - - +https://github.com/opencontainers/runc/pull/3639 + ### CRI API @@ -436,20 +209,13 @@ Which unit tests should we include? ### Graduation Criteria - - - -This KEP is a policy KEP, not a feature KEP. It will start as GA. - #### GA - ### Upgrade / Downgrade Strategy - ### Version Skew Strategy @@ -463,68 +229,35 @@ Not applicable because this is a policy KEP. ## Implementation History - - - - ## Drawbacks - - - - ## Alternatives - - - - ## Infrastructure Needed (Optional) - - +--> \ No newline at end of file