You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: keps/sig-node/4639-oci-volume-source/README.md
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -298,7 +298,10 @@ the OS or version of the scanning software.
298
298
- Allowing direct mounting of OCI objects introduces potential attack
299
299
vectors. Mitigation includes thorough security reviews and limiting access
300
300
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.
302
305
- Path traversal attacks are a high risk for introducing security
303
306
vulnerabilities. Container Runtimes should re-use their existing
304
307
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
586
589
supported container runtime version will fail to run on the node, because the
587
590
`Mount.host_path` field is not set for those mounts.
588
591
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.**
591
600
592
601
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
593
602
the CRI implementation wishes to support one image being mounted with multiple different SELinux labels. If that's done, the CRI implementation is responsible
0 commit comments