diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index 719f4452243..7e0e7232bfe 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -1,10 +1,3 @@ -API rule violation: list_type_missing,k8s.io/api/authentication/v1,TokenRequestSpec,Audiences -API rule violation: list_type_missing,k8s.io/api/authentication/v1,TokenReviewSpec,Audiences -API rule violation: list_type_missing,k8s.io/api/authentication/v1,TokenReviewStatus,Audiences -API rule violation: list_type_missing,k8s.io/api/authentication/v1,UserInfo,Groups -API rule violation: list_type_missing,k8s.io/api/authentication/v1beta1,TokenReviewSpec,Audiences -API rule violation: list_type_missing,k8s.io/api/authentication/v1beta1,TokenReviewStatus,Audiences -API rule violation: list_type_missing,k8s.io/api/authentication/v1beta1,UserInfo,Groups API rule violation: list_type_missing,k8s.io/api/authorization/v1,NonResourceRule,NonResourceURLs API rule violation: list_type_missing,k8s.io/api/authorization/v1,NonResourceRule,Verbs API rule violation: list_type_missing,k8s.io/api/authorization/v1,ResourceRule,APIGroups diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index da1053973c3..f9c3803fa71 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -2611,7 +2611,8 @@ "items": { "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "boundObjectRef": { "$ref": "#/definitions/io.k8s.api.authentication.v1.BoundObjectReference", @@ -2690,7 +2691,8 @@ "items": { "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "token": { "description": "Token is the opaque bearer token.", @@ -2707,7 +2709,8 @@ "items": { "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "authenticated": { "description": "Authenticated indicates that the token was associated with a known user.", @@ -2742,7 +2745,8 @@ "items": { "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "uid": { "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index a3cc8cd8742..7281736d7f7 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -83,7 +83,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "boundObjectRef": { "allOf": [ diff --git a/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json index 61142ff1d99..3ef2fdafed6 100644 --- a/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__authentication.k8s.io__v1_openapi.json @@ -115,7 +115,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "token": { "description": "Token is the opaque bearer token.", @@ -133,7 +134,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "authenticated": { "description": "Authenticated indicates that the token was associated with a known user.", @@ -175,7 +177,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "uid": { "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", diff --git a/api/openapi-spec/v3/apis__authentication.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__authentication.k8s.io__v1alpha1_openapi.json index 892aa5506e1..6994267ce89 100644 --- a/api/openapi-spec/v3/apis__authentication.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__authentication.k8s.io__v1alpha1_openapi.json @@ -21,7 +21,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "uid": { "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", diff --git a/api/openapi-spec/v3/apis__authentication.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__authentication.k8s.io__v1beta1_openapi.json index c8abe8d8b05..c5abf1583bb 100644 --- a/api/openapi-spec/v3/apis__authentication.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__authentication.k8s.io__v1beta1_openapi.json @@ -21,7 +21,8 @@ "default": "", "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "uid": { "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 48b0a206ec2..21a9701cac2 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -9601,6 +9601,11 @@ func schema_k8sio_api_authentication_v1_TokenRequestSpec(ref common.ReferenceCal Type: []string{"object"}, Properties: map[string]spec.Schema{ "audiences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.", Type: []string{"array"}, @@ -9733,6 +9738,11 @@ func schema_k8sio_api_authentication_v1_TokenReviewSpec(ref common.ReferenceCall }, }, "audiences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", Type: []string{"array"}, @@ -9775,6 +9785,11 @@ func schema_k8sio_api_authentication_v1_TokenReviewStatus(ref common.ReferenceCa }, }, "audiences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", Type: []string{"array"}, @@ -9826,6 +9841,11 @@ func schema_k8sio_api_authentication_v1_UserInfo(ref common.ReferenceCallback) c }, }, "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "The names of groups this user is a part of.", Type: []string{"array"}, @@ -10065,6 +10085,11 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewSpec(ref common.Referenc }, }, "audiences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", Type: []string{"array"}, @@ -10107,6 +10132,11 @@ func schema_k8sio_api_authentication_v1beta1_TokenReviewStatus(ref common.Refere }, }, "audiences": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", Type: []string{"array"}, @@ -10158,6 +10188,11 @@ func schema_k8sio_api_authentication_v1beta1_UserInfo(ref common.ReferenceCallba }, }, "groups": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "The names of groups this user is a part of.", Type: []string{"array"}, diff --git a/staging/src/k8s.io/api/authentication/v1/generated.proto b/staging/src/k8s.io/api/authentication/v1/generated.proto index 1632070c872..1fe2f4f2cec 100644 --- a/staging/src/k8s.io/api/authentication/v1/generated.proto +++ b/staging/src/k8s.io/api/authentication/v1/generated.proto @@ -99,6 +99,7 @@ message TokenRequestSpec { // token issued for multiple audiences may be used to authenticate // against any of the audiences listed but implies a high degree of // trust between the target audiences. + // +listType=atomic repeated string audiences = 1; // ExpirationSeconds is the requested duration of validity of the request. The @@ -154,6 +155,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -177,6 +179,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -199,6 +202,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/staging/src/k8s.io/api/authentication/v1/types.go b/staging/src/k8s.io/api/authentication/v1/types.go index b498007c000..4f4400e305c 100644 --- a/staging/src/k8s.io/api/authentication/v1/types.go +++ b/staging/src/k8s.io/api/authentication/v1/types.go @@ -75,6 +75,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -96,6 +97,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -115,6 +117,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional @@ -156,6 +159,7 @@ type TokenRequestSpec struct { // token issued for multiple audiences may be used to authenticate // against any of the audiences listed but implies a high degree of // trust between the target audiences. + // +listType=atomic Audiences []string `json:"audiences" protobuf:"bytes,1,rep,name=audiences"` // ExpirationSeconds is the requested duration of validity of the request. The diff --git a/staging/src/k8s.io/api/authentication/v1beta1/generated.proto b/staging/src/k8s.io/api/authentication/v1beta1/generated.proto index 53b4635d7e9..61658245d42 100644 --- a/staging/src/k8s.io/api/authentication/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/authentication/v1beta1/generated.proto @@ -87,6 +87,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -110,6 +111,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -132,6 +134,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/staging/src/k8s.io/api/authentication/v1beta1/types.go b/staging/src/k8s.io/api/authentication/v1beta1/types.go index 5bce82e7cfd..8038ef7d346 100644 --- a/staging/src/k8s.io/api/authentication/v1beta1/types.go +++ b/staging/src/k8s.io/api/authentication/v1beta1/types.go @@ -60,6 +60,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -81,6 +82,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -100,6 +102,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional