@@ -12,7 +12,7 @@ approvers:
12
12
- " @dchen1107"
13
13
editor : N/A
14
14
creation-date : 2020-03-10
15
- last-updated : 2020-03-10
15
+ last-updated : 2020-08-25
16
16
status : provisional|implementable|implemented|deferred|rejected|withdrawn|replaced
17
17
see-also :
18
18
- N/A
@@ -60,19 +60,23 @@ superseded-by:
60
60
61
61
## Summary
62
62
63
- We will add support for ensuring images pulled with pod imagePullSecrets are
64
- always authenticated even if cached. We will add a new boolean field
65
- ` ensureSecretPulledImages ` to the pod spec. The default to false
66
- means that if a first pod results in an image pulled with imagePullSecrets a
67
- second pod would have to be using always pull to ensure rights to use the
68
- previously pulled image. When set to true always pull would not be required,
69
- instead kublet will check if the image was pulled with an image pull secret and
70
- if so would force a pull of the image to ensure the image pulled with the
71
- secret is not used by another pod unless that pod also has the proper auth.
63
+ We will add support in kubelet for ensuring images pulled with pod
64
+ imagePullSecrets are always authenticated even if cached. This new feature will
65
+ be enabled via a new kublet flag ` ensureSecretPulledImages. ` The flag will
66
+ improve the security posture for privacy/security of image contents by forcing
67
+ images pulled with an imagePullSecret of a first pod to be re-authenticated for
68
+ a second pod even if the image is already present on the node. The default
69
+ (false) setting means that if a first pod results in an image pulled with
70
+ imagePullSecrets a second pod would have to be using always pull to ensure
71
+ rights to use the previously pulled image. When set to true always pull would
72
+ not be required, instead kubelet will check if the image was pulled with an
73
+ image pull secret and if so would force a pull of the image to ensure the image
74
+ pulled with the secret is not used by another pod unless that pod also has the
75
+ proper auth.
72
76
73
77
## Motivation
74
78
75
- There have been customer requests for improving upon kubernetes ability to
79
+ There have been customer requests for improving upon kubernetes' ability to
76
80
secure images pulled with auth. on a node. Issue
77
81
[ #18787 ] ( https://github.com/kubernetes/kubernetes/issues/18787 ) has been around
78
82
for a while.
@@ -91,25 +95,28 @@ authentication.)
91
95
92
96
### Goals
93
97
94
- Add a flag processed by ` kubelet ` for ` ensureSecretPulledImages ` (or something
95
- similarly named) that, if true, would force ` kubelet ` to attempt to pull every
98
+ Add a ` kubelet ` flag for ` ensureSecretPulledImages ` (or something
99
+ similarly named) as a security posture enhancement of the kubelet configuration
100
+ that, if true, would force ` kubelet ` to attempt to pull every
96
101
image that was pulled with image pulled secret based authentication, regardless
97
- of the container image's pull policy.
102
+ of the container image pull policy.
98
103
99
104
Optimize to only force re-authentication for a pod when the secret used to pull
100
- the container image is not present.
105
+ the container image is not present. IOW if an image is pulled with
106
+ authentication for a first pod subsequent pods that have the same authentication
107
+ information should not need to re-authenticate.
101
108
102
109
### Non-Goals
103
110
104
111
Out of scope for this KEP is an image caching policy that would direct container
105
112
runtimes through the CRI wrt. how they should treat the caching of images on a
106
113
node. Such as store for public use but only if encrypted. Or Store for private
107
- use unencrypted ...
114
+ use un-encrypted ...
108
115
109
116
## Proposal
110
117
111
- When ` ensureSecretPulledImages ` is set, ` kublet ` will check keep a list of
112
- container images that required authentication. ` kublet ` will ensure any image
118
+ When ` ensureSecretPulledImages ` is set, ` kubelet ` will keep a list of container
119
+ images that required authentication. ` kubelet ` will ensure any image
113
120
in the list is always pulled thus enforcing authentication / re-authentication
114
121
with the exception of pods with secrets containing an auth that has been
115
122
authenticated.
@@ -120,13 +127,14 @@ wip
120
127
### Risks and Mitigations
121
128
122
129
With the default being false, devops engineers may not know to set the flag to
123
- true in new/old pod specs that are using secrets for pull authentication with
124
- registries.
130
+ true.
125
131
126
- A mitigation would be an admission plugin to inject ` ensureSecretPulledImages. `
132
+ A mitigation would be a warning message or we could choose to make the default
133
+ true.
127
134
128
- Images authentications with a registry may expire. To mitigate expirations a
129
- a timeout could be used to force re-authentication.
135
+ Image authentications with a registry may expire. To mitigate expirations a
136
+ a timeout could be used to force re-authentication. The timeout could be a
137
+ container runtime feature or a ` kubelet ` feature.
130
138
131
139
## Design Details
132
140
@@ -160,9 +168,8 @@ Why should this KEP _not_ be implemented. N/A
160
168
161
169
## Alternatives [ optional]
162
170
163
- Default the ensure secrets rule to true and don't introduce a new pod spec flag.
164
- Instead of a pod spec flag make the option a kublet configuration switch or
165
- set the flag at some other scope.
171
+ - Make the option a ` kubelet ` configuration switch (This is the SIG-Node suggested option).
172
+ - Set the flag at some other scope e.g. pod spec (doing it at the pod spec was rejected by SIG-Node).
166
173
167
174
## Infrastructure Needed [ optional]
168
175
0 commit comments