Skip to content

Commit afdc033

Browse files
author
Yann Hamon
committed
Adding new schemas
1 parent df6ae4d commit afdc033

File tree

64 files changed

+4217
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4217
-8
lines changed

master-local/_definitions.json

+71-1
Original file line numberDiff line numberDiff line change
@@ -3411,6 +3411,42 @@
34113411
},
34123412
"type": "object"
34133413
},
3414+
"io.k8s.api.authorization.v1.FieldSelectorAttributes": {
3415+
"description": "FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.",
3416+
"properties": {
3417+
"rawSelector": {
3418+
"description": "rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.",
3419+
"type": "string"
3420+
},
3421+
"requirements": {
3422+
"description": "requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.",
3423+
"items": {
3424+
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement"
3425+
},
3426+
"type": "array",
3427+
"x-kubernetes-list-type": "atomic"
3428+
}
3429+
},
3430+
"type": "object"
3431+
},
3432+
"io.k8s.api.authorization.v1.LabelSelectorAttributes": {
3433+
"description": "LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.",
3434+
"properties": {
3435+
"rawSelector": {
3436+
"description": "rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.",
3437+
"type": "string"
3438+
},
3439+
"requirements": {
3440+
"description": "requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.",
3441+
"items": {
3442+
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"
3443+
},
3444+
"type": "array",
3445+
"x-kubernetes-list-type": "atomic"
3446+
}
3447+
},
3448+
"type": "object"
3449+
},
34143450
"io.k8s.api.authorization.v1.LocalSubjectAccessReview": {
34153451
"description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
34163452
"properties": {
@@ -3492,10 +3528,18 @@
34923528
"io.k8s.api.authorization.v1.ResourceAttributes": {
34933529
"description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
34943530
"properties": {
3531+
"fieldSelector": {
3532+
"$ref": "#/definitions/io.k8s.api.authorization.v1.FieldSelectorAttributes",
3533+
"description": "fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.\n\nThis field is alpha-level. To use this field, you must enable the `AuthorizeWithSelectors` feature gate (disabled by default)."
3534+
},
34953535
"group": {
34963536
"description": "Group is the API Group of the Resource. \"*\" means all.",
34973537
"type": "string"
34983538
},
3539+
"labelSelector": {
3540+
"$ref": "#/definitions/io.k8s.api.authorization.v1.LabelSelectorAttributes",
3541+
"description": "labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.\n\nThis field is alpha-level. To use this field, you must enable the `AuthorizeWithSelectors` feature gate (disabled by default)."
3542+
},
34993543
"name": {
35003544
"description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
35013545
"type": "string"
@@ -17965,7 +18009,7 @@
1796518009
"type": "boolean"
1796618010
},
1796718011
"x-kubernetes-validations": {
17968-
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.",
18012+
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language.",
1796918013
"items": {
1797018014
"$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule"
1797118015
},
@@ -18724,6 +18768,32 @@
1872418768
}
1872518769
]
1872618770
},
18771+
"io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement": {
18772+
"description": "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.",
18773+
"properties": {
18774+
"key": {
18775+
"description": "key is the field selector key that the requirement applies to.",
18776+
"type": "string"
18777+
},
18778+
"operator": {
18779+
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.",
18780+
"type": "string"
18781+
},
18782+
"values": {
18783+
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.",
18784+
"items": {
18785+
"type": "string"
18786+
},
18787+
"type": "array",
18788+
"x-kubernetes-list-type": "atomic"
18789+
}
18790+
},
18791+
"required": [
18792+
"key",
18793+
"operator"
18794+
],
18795+
"type": "object"
18796+
},
1872718797
"io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": {
1872818798
"description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:<name>', where <name> is the name of a field in a struct, or key in a map 'v:<value>', where <value> is the exact json formatted value of a list item 'i:<index>', where <index> is position of a item in a list 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff",
1872918799
"type": "object"

master-local/all.json

+9
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@
330330
{
331331
"$ref": "_definitions.json#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReviewStatus"
332332
},
333+
{
334+
"$ref": "_definitions.json#/definitions/io.k8s.api.authorization.v1.FieldSelectorAttributes"
335+
},
336+
{
337+
"$ref": "_definitions.json#/definitions/io.k8s.api.authorization.v1.LabelSelectorAttributes"
338+
},
333339
{
334340
"$ref": "_definitions.json#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview"
335341
},
@@ -1809,6 +1815,9 @@
18091815
{
18101816
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"
18111817
},
1818+
{
1819+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement"
1820+
},
18121821
{
18131822
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1"
18141823
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"description": "FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.",
3+
"properties": {
4+
"rawSelector": {
5+
"description": "rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"requirements": {
12+
"description": "requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.",
13+
"items": {
14+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement"
15+
},
16+
"type": [
17+
"array",
18+
"null"
19+
],
20+
"x-kubernetes-list-type": "atomic"
21+
}
22+
},
23+
"type": "object",
24+
"$schema": "http://json-schema.org/schema#"
25+
}
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"description": "FieldSelectorAttributes indicates a field limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.",
3+
"properties": {
4+
"rawSelector": {
5+
"description": "rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"requirements": {
12+
"description": "requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.",
13+
"items": {
14+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement"
15+
},
16+
"type": [
17+
"array",
18+
"null"
19+
],
20+
"x-kubernetes-list-type": "atomic"
21+
}
22+
},
23+
"type": "object",
24+
"$schema": "http://json-schema.org/schema#"
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"description": "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.",
3+
"properties": {
4+
"key": {
5+
"description": "key is the field selector key that the requirement applies to.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"operator": {
12+
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.",
13+
"type": [
14+
"string",
15+
"null"
16+
]
17+
},
18+
"values": {
19+
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.",
20+
"items": {
21+
"type": [
22+
"string",
23+
"null"
24+
]
25+
},
26+
"type": [
27+
"array",
28+
"null"
29+
],
30+
"x-kubernetes-list-type": "atomic"
31+
}
32+
},
33+
"required": [
34+
"key",
35+
"operator"
36+
],
37+
"type": "object",
38+
"$schema": "http://json-schema.org/schema#"
39+
}
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"description": "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.",
3+
"properties": {
4+
"key": {
5+
"description": "key is the field selector key that the requirement applies to.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"operator": {
12+
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.",
13+
"type": [
14+
"string",
15+
"null"
16+
]
17+
},
18+
"values": {
19+
"description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.",
20+
"items": {
21+
"type": [
22+
"string",
23+
"null"
24+
]
25+
},
26+
"type": [
27+
"array",
28+
"null"
29+
],
30+
"x-kubernetes-list-type": "atomic"
31+
}
32+
},
33+
"required": [
34+
"key",
35+
"operator"
36+
],
37+
"type": "object",
38+
"$schema": "http://json-schema.org/schema#"
39+
}

master-local/jsonschemaprops-apiextensions-v1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
]
293293
},
294294
"x-kubernetes-validations": {
295-
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.",
295+
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language.",
296296
"items": {
297297
"$ref": "_definitions.json#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule"
298298
},

master-local/jsonschemaprops.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
]
293293
},
294294
"x-kubernetes-validations": {
295-
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language. This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.",
295+
"description": "x-kubernetes-validations describes a list of validation rules written in the CEL expression language.",
296296
"items": {
297297
"$ref": "_definitions.json#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule"
298298
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"description": "LabelSelectorAttributes indicates a label limited access. Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.",
3+
"properties": {
4+
"rawSelector": {
5+
"description": "rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver's *SubjectAccessReview will parse the rawSelector as long as the requirements are not present.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"requirements": {
12+
"description": "requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood.",
13+
"items": {
14+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"
15+
},
16+
"type": [
17+
"array",
18+
"null"
19+
],
20+
"x-kubernetes-list-type": "atomic"
21+
}
22+
},
23+
"type": "object",
24+
"$schema": "http://json-schema.org/schema#"
25+
}

0 commit comments

Comments
 (0)