k8s.io/apiserver@v0.31.1/pkg/authentication/authenticatorfactory/requestheader.go (about)

     1  /*
     2  Copyright 2014 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package authenticatorfactory
    18  
    19  import (
    20  	"k8s.io/apiserver/pkg/authentication/request/headerrequest"
    21  	"k8s.io/apiserver/pkg/server/dynamiccertificates"
    22  )
    23  
    24  type RequestHeaderConfig struct {
    25  	// UsernameHeaders are the headers to check (in order, case-insensitively) for an identity. The first header with a value wins.
    26  	UsernameHeaders headerrequest.StringSliceProvider
    27  	// GroupHeaders are the headers to check (case-insensitively) for a group names.  All values will be used.
    28  	GroupHeaders headerrequest.StringSliceProvider
    29  	// ExtraHeaderPrefixes are the head prefixes to check (case-insentively) for filling in
    30  	// the user.Info.Extra.  All values of all matching headers will be added.
    31  	ExtraHeaderPrefixes headerrequest.StringSliceProvider
    32  	// CAContentProvider the options for verifying incoming connections using mTLS.  Generally this points to CA bundle file which is used verify the identity of the front proxy.
    33  	//	It may produce different options at will.
    34  	CAContentProvider dynamiccertificates.CAContentProvider
    35  	// AllowedClientNames is a list of common names that may be presented by the authenticating front proxy.  Empty means: accept any.
    36  	AllowedClientNames headerrequest.StringSliceProvider
    37  }