@@ -46,7 +46,10 @@ compromised pod can not be used as a springboard for other attacks.
46
46
47
47
- As an administrator, I need to be able to override specific
48
48
OpenShift policies to be more restrictive so that I can satisfy my
49
- security department
49
+ security requirements. For instance there may be cases where a core
50
+ component may be able to call webhooks, but I do not want to use
51
+ them on the cluster, or have a specific list of endpoints. I may
52
+ want to override our permissive list to make it more restrictive.
50
53
51
54
- As an OpenShift release manager, I want to know that all cluster
52
55
namespaces have policies applied so that I can determine if we are
@@ -69,19 +72,26 @@ compromised pod can not be used as a springboard for other attacks.
69
72
70
73
- Audit the policies for compliance
71
74
72
- - Ensure all OpenShift namespaces have a default deny-all policy
73
- defined, and identify those that do not (including “openshift-”
74
- namespaces managed by a non Red Hat operator)
75
+ - Ensure all OpenShift namespaces have a default deny-all policy for
76
+ both egress and ingress defined, and identify those that do not
77
+ (including ` openshift- ` namespaces managed by a non Red Hat
78
+ operator)
75
79
76
80
77
81
### Non-Goals
78
82
79
83
- We are not considering requiring the definition of Admin Network
80
- Policy for components (yet) . But the documentation of the network
84
+ Policy for components. But the documentation of the network
81
85
connections that a namespace uses should make future development of
82
- Admin Network Policy easier. We will be using Admin Network Policy
83
- to allow cluster admins to override our namespace Network Policies
84
- if needed.
86
+ Admin Network Policy easier should we desire it. We will be using
87
+ Admin Network Policy to allow cluster admins to override our
88
+ namespace Network Policies if needed. One of the reasons for not
89
+ requiring core components to have Admin Network Policy is that then
90
+ the operational complexity of managing them across upgrades would
91
+ need to move to a third-party operator. Similarly, it is better to
92
+ have the network policies near the code that uses them so that the
93
+ team responsible for the objects develops and maintains the network
94
+ policies.
85
95
86
96
- Adding policies for operators not created by Red Hat
87
97
@@ -90,7 +100,7 @@ compromised pod can not be used as a springboard for other attacks.
90
100
91
101
1 . Change the namespace admission controller so all namespaces with an
92
102
openshift- prefix (since those are special anyway) are labeled with
93
- the “ openshift-namespace’ label so ** that network policy can address
103
+ the ` security. openshift.io/openshift -namespace` label so ** that network policy can address
94
104
them**
95
105
96
106
2 . Change the cluster-network-operator to apply the same label to all
@@ -123,22 +133,14 @@ compromised pod can not be used as a springboard for other attacks.
123
133
chance to run (but that may break things installed from the operator
124
134
catalog into the openshift namespace)
125
135
126
- Issues:
127
-
128
- - Need to work out a good way to say “can not talk to pods, only to
129
- external”. Right now it is ugly, it needs an ipblock rule with an
130
- ‘except’ clause for all of the pod CIDRs… so an operator that needs
131
- that rule needs to read the config and maintain the policy
132
-
133
-
134
136
### Workflow Description
135
137
136
138
** Cluster administrator** is a human user in charge of running a cluster.
137
139
138
140
** OpenShift developer** is a human responsible for creating and maintaining OpenShift.
139
141
140
142
** Third-Party developer** is a human who creates an operator that
141
- creates an “ openshift-” namespace. This is assumed to be for
143
+ creates an ` openshift- ` namespace. This is assumed to be for
142
144
something extending OpenShift platform capabilities.
143
145
144
146
** Namespace Admission Controller** is a function in the OpenShift API
@@ -156,15 +158,15 @@ Issues:
156
158
157
159
2 . The Namespace Admission Controller will look at the namespace name
158
160
159
- 3 . If it starts with “ openshift-” it will be treated as an OpenShift
161
+ 3 . If it starts with ` openshift- ` it will be treated as an OpenShift
160
162
namespace (since that namespace prefix has special meaning already
161
163
elsewhere in the code)
162
164
163
165
1 . The namespace object will be changed to have a label applied with
164
- the name “ openshift-namespace” and the value “true”
166
+ the name ` security. openshift.io/openshift -namespace` and the value ''
165
167
166
- 4 . If it does not start with “ openshift-” then any
167
- “ openshift-namespace” label will be stripped out and can not be set
168
+ 4 . If it does not start with ` openshift- ` then any
169
+ ` security. openshift.io/openshift -namespace` label will be stripped out and can not be set
168
170
169
171
170
172
#### Applying the label at upgrade
@@ -176,12 +178,18 @@ Issues:
176
178
177
179
1 . Loop over all namespaces
178
180
179
- 2 . If it sees a namespace starting with “ openshift-”
181
+ 2 . If it sees a namespace starting with ` openshift- `
180
182
181
183
1 . The namespace object will be changed to have a label applied
182
- with the name “ openshift-namespace” and the value “true”
184
+ with the name ` security. openshift.io/openshift -namespace` and the value ""
183
185
184
- 3 . Otherwise it will strip the “openshift-namespace” label
186
+ 3 . Otherwise it will strip the ` security.openshift.io/openshift-namespace ` label
187
+
188
+ TODO: Decide if this is the correct behavior... do we want to allow
189
+ namespaces to opt-in to being part of the platform. I do not think
190
+ there is a security issue since we are just adding restrictions,
191
+ but that needs more consideration. The advantage would be for
192
+ things like ACS that do not install into an ` openshift- ` namespace.
185
193
186
194
187
195
#### Opting Into a Default Deny for OpenShift
@@ -196,7 +204,7 @@ Issues:
196
204
197
205
#### Setting a Global Default Deny
198
206
199
- 1 . The Cluster Administrator can deploy an Admin Network Policy we
207
+ 1 . The Cluster Administrator can deploy an AdminNetworkPolicy we
200
208
will document and test
201
209
202
210
2 . The policy will change the default for all namespaces in the
@@ -206,7 +214,7 @@ Issues:
206
214
207
215
#### Removing Policy Restrictions for OpenShift
208
216
209
- 1 . The Cluster Administrator can deploy an Admin Network Policy we
217
+ 1 . The Cluster Administrator can deploy an AdminNetworkPolicy we
210
218
will document with a public KCS and test
211
219
212
220
2 . The policy will bypass Network Policy for all namespaces with the
@@ -257,9 +265,9 @@ Issues:
257
265
### API Extensions
258
266
259
267
This extends the API server by changing the Admission Controller on
260
- namespace objects so that the label “ openshift-namespace” is applied
268
+ namespace objects so that the label ` security. openshift.io/openshift -namespace` is applied
261
269
or removed depending on whether the namespace name starts with
262
- “ openshift-” .
270
+ ` openshift- ` .
263
271
264
272
Other than that, there is no other API change.
265
273
@@ -310,7 +318,7 @@ enhancement.
310
318
311
319
Almost every pod will need to have an egress policy to allow DNS.
312
320
Would it be better to have one policy that can be enabled by a label?
313
- Or just have an admin network policy that just allows it.
321
+ Or just have an AdminNetworkPolicy that just allows it.
314
322
315
323
316
324
#### Host Network Pods
@@ -357,19 +365,6 @@ Admin Network Policy can be used to override our policies until a fix
357
365
can be delivered in a z-stream.
358
366
359
367
360
- #### Policies Too Open
361
-
362
- The converse can also happen… we may write a policy that a customer
363
- finds is too open, or they may wish to impose additional restrictions
364
- that we may allow in general (for instance, something could allow a
365
- webhook to be called off-cluster, but they may want to forbid all
366
- off-cluster traffic from the namespace since they do not use that
367
- feature).
368
-
369
- Customers can write admin network policies that override the network
370
- policies that we ship.
371
-
372
-
373
368
#### Challenges Debugging and Supporting
374
369
375
370
When a network policy blocks traffic, it may be blocking traffic of an
@@ -393,7 +388,7 @@ None foreseen.
393
388
394
389
- The existing e2e and integration tests should catch network policy errors where they are too restrictive
395
390
396
- - We will need to add new tests to ensure that all “ openshift-” namespaces have the default deny policy defined.
391
+ - We will need to add new tests to ensure that all ` openshift- ` namespaces have the default deny policy defined.
397
392
398
393
- We should add a test that runs alongside the existing e2e tests to
399
394
monitor for connections being blocked by network policy in openshift
@@ -404,11 +399,15 @@ None foreseen.
404
399
405
400
## Graduation Criteria
406
401
407
- GA:
402
+ ### Dev Preview -> Tech Preview
403
+
404
+ We do not anticipate a dev preview or tech preview.
405
+
406
+ ### Tech Preview -> GA
408
407
409
408
- Cluster Network Operator changes complete:
410
409
- Namespace Admission controller change complete
411
- - Must-gather able to get all recent network policy connection blocks in “ openshift-” namespaces
410
+ - Must-gather able to get all recent network policy connection blocks in ` openshift- ` namespaces
412
411
- Customers must be able to see network policy connection blocks using the observability tools
413
412
- The test changes as described above must be complete
414
413
- Documentation will be updated to describe how to:
@@ -417,14 +416,16 @@ GA:
417
416
- Apply a default-deny rule to all cluster namespaces
418
417
- Disable our policies in a KCS
419
418
419
+ ### Removing a deprecated feature
420
420
421
- ## Upgrade / Downgrade Strategy
421
+ If the feature is deprecated, then we will need to strip the labels we
422
+ added and remove the code. The policies developed for the namespaces
423
+ should remain.
422
424
425
+ ## Upgrade / Downgrade Strategy
423
426
424
427
#### Upgrades:
425
428
426
-
427
-
428
429
1 . The new API server will roll out and will start labeling namespaces
429
430
430
431
2 . The Cluster Network Operator will be upgraded and upon restart it
@@ -460,6 +461,10 @@ At which point, the cluster administrator can use the new labels to easily apply
460
461
have to define policies for the old flow and the new, but that would
461
462
be atypical
462
463
464
+ ## Operational Aspects of API Extensions
465
+
466
+ Not applicable. There will be no API change.
467
+
463
468
464
469
## Support Procedures
465
470
@@ -529,4 +534,14 @@ Ideas:
529
534
stock one to allow DNS and API access and nothing else?
530
535
531
536
- Should we allow everything to get DNS access? Is there ever a need
532
- not to?
537
+ not to?
538
+
539
+ - Need to work out a good way to say “can not talk to pods, only to
540
+ external”. Right now it is ugly, it needs an ipblock rule with an
541
+ ‘except’ clause for all of the pod CIDRs… so an operator that needs
542
+ that rule needs to read the config and maintain the policy.
543
+
544
+ Or we may define a global ANP that allows namespaces labelled with
545
+ ` security.openshift.io/openshift-namespace ` to label pods that need
546
+ this rule applied.
547
+
0 commit comments