Fix list_type_missing in api/authentication

This commit is contained in:
Tim Hockin 2023-11-12 15:07:57 -08:00
parent a3ea994fa2
commit b24cffb174
No known key found for this signature in database
11 changed files with 69 additions and 17 deletions

View File

@ -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

View File

@ -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.",

View File

@ -83,7 +83,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"boundObjectRef": {
"allOf": [

View File

@ -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.",

View File

@ -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.",

View File

@ -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.",

View File

@ -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"},

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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