...

Text file src/k8s.io/api/authentication/v1/generated.proto

Documentation: k8s.io/api/authentication/v1

     1/*
     2Copyright The Kubernetes Authors.
     3
     4Licensed under the Apache License, Version 2.0 (the "License");
     5you may not use this file except in compliance with the License.
     6You may obtain a copy of the License at
     7
     8    http://www.apache.org/licenses/LICENSE-2.0
     9
    10Unless required by applicable law or agreed to in writing, software
    11distributed under the License is distributed on an "AS IS" BASIS,
    12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13See the License for the specific language governing permissions and
    14limitations under the License.
    15*/
    16
    17
    18// This file was autogenerated by go-to-protobuf. Do not edit it manually!
    19
    20syntax = "proto2";
    21
    22package k8s.io.api.authentication.v1;
    23
    24import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    25import "k8s.io/apimachinery/pkg/runtime/generated.proto";
    26import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
    27
    28// Package-wide variables from generator "generated".
    29option go_package = "k8s.io/api/authentication/v1";
    30
    31// BoundObjectReference is a reference to an object that a token is bound to.
    32message BoundObjectReference {
    33  // Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
    34  // +optional
    35  optional string kind = 1;
    36
    37  // API version of the referent.
    38  // +optional
    39  optional string apiVersion = 2;
    40
    41  // Name of the referent.
    42  // +optional
    43  optional string name = 3;
    44
    45  // UID of the referent.
    46  // +optional
    47  optional string uID = 4;
    48}
    49
    50// ExtraValue masks the value so protobuf can generate
    51// +protobuf.nullable=true
    52// +protobuf.options.(gogoproto.goproto_stringer)=false
    53message ExtraValue {
    54  // items, if empty, will result in an empty slice
    55
    56  repeated string items = 1;
    57}
    58
    59// SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
    60// When using impersonation, users will receive the user info of the user being impersonated.  If impersonation or
    61// request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
    62message SelfSubjectReview {
    63  // Standard object's metadata.
    64  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    65  // +optional
    66  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    67
    68  // Status is filled in by the server with the user attributes.
    69  optional SelfSubjectReviewStatus status = 2;
    70}
    71
    72// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
    73message SelfSubjectReviewStatus {
    74  // User attributes of the user making this request.
    75  // +optional
    76  optional UserInfo userInfo = 1;
    77}
    78
    79// TokenRequest requests a token for a given service account.
    80message TokenRequest {
    81  // Standard object's metadata.
    82  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    83  // +optional
    84  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    85
    86  // Spec holds information about the request being evaluated
    87  optional TokenRequestSpec spec = 2;
    88
    89  // Status is filled in by the server and indicates whether the token can be authenticated.
    90  // +optional
    91  optional TokenRequestStatus status = 3;
    92}
    93
    94// TokenRequestSpec contains client provided parameters of a token request.
    95message TokenRequestSpec {
    96  // Audiences are the intendend audiences of the token. A recipient of a
    97  // token must identify themself with an identifier in the list of
    98  // audiences of the token, and otherwise should reject the token. A
    99  // token issued for multiple audiences may be used to authenticate
   100  // against any of the audiences listed but implies a high degree of
   101  // trust between the target audiences.
   102  // +listType=atomic
   103  repeated string audiences = 1;
   104
   105  // ExpirationSeconds is the requested duration of validity of the request. The
   106  // token issuer may return a token with a different validity duration so a
   107  // client needs to check the 'expiration' field in a response.
   108  // +optional
   109  optional int64 expirationSeconds = 4;
   110
   111  // BoundObjectRef is a reference to an object that the token will be bound to.
   112  // The token will only be valid for as long as the bound object exists.
   113  // NOTE: The API server's TokenReview endpoint will validate the
   114  // BoundObjectRef, but other audiences may not. Keep ExpirationSeconds
   115  // small if you want prompt revocation.
   116  // +optional
   117  optional BoundObjectReference boundObjectRef = 3;
   118}
   119
   120// TokenRequestStatus is the result of a token request.
   121message TokenRequestStatus {
   122  // Token is the opaque bearer token.
   123  optional string token = 1;
   124
   125  // ExpirationTimestamp is the time of expiration of the returned token.
   126  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time expirationTimestamp = 2;
   127}
   128
   129// TokenReview attempts to authenticate a token to a known user.
   130// Note: TokenReview requests may be cached by the webhook token authenticator
   131// plugin in the kube-apiserver.
   132message TokenReview {
   133  // Standard object's metadata.
   134  // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   135  // +optional
   136  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
   137
   138  // Spec holds information about the request being evaluated
   139  optional TokenReviewSpec spec = 2;
   140
   141  // Status is filled in by the server and indicates whether the request can be authenticated.
   142  // +optional
   143  optional TokenReviewStatus status = 3;
   144}
   145
   146// TokenReviewSpec is a description of the token authentication request.
   147message TokenReviewSpec {
   148  // Token is the opaque bearer token.
   149  // +optional
   150  optional string token = 1;
   151
   152  // Audiences is a list of the identifiers that the resource server presented
   153  // with the token identifies as. Audience-aware token authenticators will
   154  // verify that the token was intended for at least one of the audiences in
   155  // this list. If no audiences are provided, the audience will default to the
   156  // audience of the Kubernetes apiserver.
   157  // +optional
   158  // +listType=atomic
   159  repeated string audiences = 2;
   160}
   161
   162// TokenReviewStatus is the result of the token authentication request.
   163message TokenReviewStatus {
   164  // Authenticated indicates that the token was associated with a known user.
   165  // +optional
   166  optional bool authenticated = 1;
   167
   168  // User is the UserInfo associated with the provided token.
   169  // +optional
   170  optional UserInfo user = 2;
   171
   172  // Audiences are audience identifiers chosen by the authenticator that are
   173  // compatible with both the TokenReview and token. An identifier is any
   174  // identifier in the intersection of the TokenReviewSpec audiences and the
   175  // token's audiences. A client of the TokenReview API that sets the
   176  // spec.audiences field should validate that a compatible audience identifier
   177  // is returned in the status.audiences field to ensure that the TokenReview
   178  // server is audience aware. If a TokenReview returns an empty
   179  // status.audience field where status.authenticated is "true", the token is
   180  // valid against the audience of the Kubernetes API server.
   181  // +optional
   182  // +listType=atomic
   183  repeated string audiences = 4;
   184
   185  // Error indicates that the token couldn't be checked
   186  // +optional
   187  optional string error = 3;
   188}
   189
   190// UserInfo holds the information about the user needed to implement the
   191// user.Info interface.
   192message UserInfo {
   193  // The name that uniquely identifies this user among all active users.
   194  // +optional
   195  optional string username = 1;
   196
   197  // A unique value that identifies this user across time. If this user is
   198  // deleted and another user by the same name is added, they will have
   199  // different UIDs.
   200  // +optional
   201  optional string uid = 2;
   202
   203  // The names of groups this user is a part of.
   204  // +optional
   205  // +listType=atomic
   206  repeated string groups = 3;
   207
   208  // Any additional information provided by the authenticator.
   209  // +optional
   210  map<string, ExtraValue> extra = 4;
   211}
   212

View as plain text