Skip to content

Commit 2d4ec5e

Browse files
committed
KEP-4639: Allow writeable, container isolated volume content
This proposal changes the KEP to allow writing the image volume contents in the same way as we already support it for the actual running container image. Runtimes have to ensure that the isolation is restricted to the running container by using technologies like overlayfs. Signed-off-by: Sascha Grunert <[email protected]>
1 parent 8e02558 commit 2d4ec5e

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

keps/sig-node/4639-oci-volume-source/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ the OS or version of the scanning software.
298298
- Allowing direct mounting of OCI objects introduces potential attack
299299
vectors. Mitigation includes thorough security reviews and limiting access
300300
to trusted registries. Limiting to non-runnable content
301-
and read-only mode will lessen the security risk.
301+
and read-only mode will lessen the security risk. If the image content is
302+
writable in a strictly pod isolated way, then runtimes have to
303+
ensure that proper isolation, as well as the necessary cleanup on
304+
pod removal.
302305
- Path traversal attacks are a high risk for introducing security
303306
vulnerabilities. Container Runtimes should re-use their existing
304307
implementations to merge layers as well as secure join symbolic links in
@@ -586,8 +589,14 @@ feature cannot be used. Pods using the new `VolumeSource` combined with a not
586589
supported container runtime version will fail to run on the node, because the
587590
`Mount.host_path` field is not set for those mounts.
588591

589-
For security reasons, volume mounts should set the [`noexec`] and `ro`
590-
(read-only) options by default.
592+
For the most conservative security approach, image volumes _should_ be mounted
593+
by runtimes with enabled `ro` (read-only), `rro` (recursive read-only) and/or the
594+
`noexec` flag. Runtimes _may_ support writable or executable volumes in the same
595+
way as the running container image contents are writable (for example by
596+
utilizing overlayfs). This enables users to modify the image volume contents in
597+
a non-persistent and pod isolated environment. **In the end it's ultimately up
598+
to the runtime to define the mounting behavior depending on the underlying
599+
technologies being used.**
591600

592601
Note: in the process of mounting images into the container's rootfs, there may need to be intermediate mounts created. This is especially relevant if
593602
the CRI implementation wishes to support one image being mounted with multiple different SELinux labels. If that's done, the CRI implementation is responsible

keps/sig-node/4639-oci-volume-source/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ stage: beta
4646
# The most recent milestone for which work toward delivery of this KEP has been
4747
# done. This can be the current (upcoming) milestone, if it is being actively
4848
# worked on.
49-
latest-milestone: "v1.33"
49+
latest-milestone: "v1.34"
5050

5151
# The milestone at which this feature was, or is targeted to be, at each stage.
5252
milestone:

0 commit comments

Comments
 (0)