forked from yannh/kubernetes-json-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpodsecuritypolicyspec.json
525 lines (525 loc) · 17 KB
/
podsecuritypolicyspec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
{
"description": "PodSecurityPolicySpec defines the policy enforced.",
"properties": {
"allowPrivilegeEscalation": {
"description": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.",
"type": [
"boolean",
"null"
]
},
"allowedCSIDrivers": {
"description": "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate.",
"items": {
"description": "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.",
"properties": {
"name": {
"description": "Name is the registered name of the CSI driver",
"type": "string"
}
},
"required": [
"name"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"allowedCapabilities": {
"description": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"allowedFlexVolumes": {
"description": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.",
"items": {
"description": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.",
"properties": {
"driver": {
"description": "driver is the name of the Flexvolume driver.",
"type": "string"
}
},
"required": [
"driver"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"allowedHostPaths": {
"description": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.",
"items": {
"description": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.",
"properties": {
"pathPrefix": {
"description": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`",
"type": [
"string",
"null"
]
},
"readOnly": {
"description": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.",
"type": [
"boolean",
"null"
]
}
},
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"allowedProcMountTypes": {
"description": "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"allowedUnsafeSysctls": {
"description": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"defaultAddCapabilities": {
"description": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"defaultAllowPrivilegeEscalation": {
"description": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.",
"type": [
"boolean",
"null"
]
},
"forbiddenSysctls": {
"description": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"fsGroup": {
"description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
"properties": {
"ranges": {
"description": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.",
"items": {
"description": "IDRange provides a min/max of an allowed range of IDs.",
"properties": {
"max": {
"description": "max is the end of the range, inclusive.",
"format": "int64",
"type": "integer"
},
"min": {
"description": "min is the start of the range, inclusive.",
"format": "int64",
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"rule": {
"description": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
"type": [
"string",
"null"
]
}
},
"type": [
"object",
"null"
]
},
"hostIPC": {
"description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
"type": [
"boolean",
"null"
]
},
"hostNetwork": {
"description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
"type": [
"boolean",
"null"
]
},
"hostPID": {
"description": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
"type": [
"boolean",
"null"
]
},
"hostPorts": {
"description": "hostPorts determines which host port ranges are allowed to be exposed.",
"items": {
"description": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.",
"properties": {
"max": {
"description": "max is the end of the range, inclusive.",
"format": "int32",
"type": "integer"
},
"min": {
"description": "min is the start of the range, inclusive.",
"format": "int32",
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"privileged": {
"description": "privileged determines if a pod can request to be run as privileged.",
"type": [
"boolean",
"null"
]
},
"readOnlyRootFilesystem": {
"description": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
"type": [
"boolean",
"null"
]
},
"requiredDropCapabilities": {
"description": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
},
"runAsGroup": {
"description": "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.",
"properties": {
"ranges": {
"description": "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.",
"items": {
"description": "IDRange provides a min/max of an allowed range of IDs.",
"properties": {
"max": {
"description": "max is the end of the range, inclusive.",
"format": "int64",
"type": "integer"
},
"min": {
"description": "min is the start of the range, inclusive.",
"format": "int64",
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"rule": {
"description": "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.",
"type": "string"
}
},
"required": [
"rule"
],
"type": [
"object",
"null"
]
},
"runAsUser": {
"description": "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.",
"properties": {
"ranges": {
"description": "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.",
"items": {
"description": "IDRange provides a min/max of an allowed range of IDs.",
"properties": {
"max": {
"description": "max is the end of the range, inclusive.",
"format": "int64",
"type": "integer"
},
"min": {
"description": "min is the start of the range, inclusive.",
"format": "int64",
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"rule": {
"description": "rule is the strategy that will dictate the allowable RunAsUser values that may be set.",
"type": "string"
}
},
"required": [
"rule"
],
"type": [
"object",
"null"
]
},
"runtimeClass": {
"description": "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.",
"properties": {
"allowedRuntimeClassNames": {
"description": "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.",
"items": {
"type": [
"string",
"null"
]
},
"type": "array"
},
"defaultRuntimeClassName": {
"description": "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.",
"type": [
"string",
"null"
]
}
},
"required": [
"allowedRuntimeClassNames"
],
"type": [
"object",
"null"
]
},
"seLinux": {
"description": "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.",
"properties": {
"rule": {
"description": "rule is the strategy that will dictate the allowable labels that may be set.",
"type": "string"
},
"seLinuxOptions": {
"description": "SELinuxOptions are the labels to be applied to the container",
"properties": {
"level": {
"description": "Level is SELinux level label that applies to the container.",
"type": [
"string",
"null"
]
},
"role": {
"description": "Role is a SELinux role label that applies to the container.",
"type": [
"string",
"null"
]
},
"type": {
"description": "Type is a SELinux type label that applies to the container.",
"type": [
"string",
"null"
]
},
"user": {
"description": "User is a SELinux user label that applies to the container.",
"type": [
"string",
"null"
]
}
},
"type": [
"object",
"null"
]
}
},
"required": [
"rule"
],
"type": [
"object",
"null"
]
},
"supplementalGroups": {
"description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
"properties": {
"ranges": {
"description": "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.",
"items": {
"description": "IDRange provides a min/max of an allowed range of IDs.",
"properties": {
"max": {
"description": "max is the end of the range, inclusive.",
"format": "int64",
"type": "integer"
},
"min": {
"description": "min is the start of the range, inclusive.",
"format": "int64",
"type": "integer"
}
},
"required": [
"min",
"max"
],
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"rule": {
"description": "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
"type": [
"string",
"null"
]
}
},
"type": [
"object",
"null"
]
},
"volumes": {
"description": "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.",
"items": {
"type": [
"string",
"null"
]
},
"type": [
"array",
"null"
]
}
},
"required": [
"seLinux",
"runAsUser",
"supplementalGroups",
"fsGroup"
],
"type": "object",
"$schema": "http://json-schema.org/schema#"
}