authheaders

package
v0.33.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package authheaders contains helpers for stamping the request-header identity headers (X-Remote-User / X-Remote-Group / X-Remote-Extra-*) that kcp proxies use to forward an authenticated identity to a backend shard or virtual workspace. The backend trusts these headers verbatim over the proxy's mutually-authenticated connection, so the stamping must always strip any client-supplied copies first.

Index

Constants

View Source
const (
	DefaultUserHeader        = "X-Remote-User"
	DefaultGroupHeader       = "X-Remote-Group"
	DefaultExtraHeaderPrefix = "X-Remote-Extra-"
)

The header names a backend is conventionally configured to trust, matching the --requestheader-username-headers, --requestheader-group-headers and --requestheader-extra-headers-prefix that kcp starts its shards and virtual workspace servers with.

Variables

This section is empty.

Functions

func ClearAuthHeaders added in v0.31.4

func ClearAuthHeaders(header http.Header, userHeader, groupHeader, extraHeaderPrefix string)

ClearAuthHeaders deletes any inbound copies of the request-header identity headers.

func SetAuthHeaders

func SetAuthHeaders(header http.Header, user userinfo.Info, userHeader, groupHeader, extraHeaderPrefix string)

SetAuthHeaders stamps the given authenticated user's identity onto the request headers, after deleting any inbound copies of the identity headers.

This mirrors k8s.io/client-go/transport.SetAuthProxyHeaders and the upstream requestheader authenticator's ClearAuthenticationHeaders.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL