token_review

package
v0.0.0-...-d2452cb Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServerName is the name of the server.
	ServerName = "envoy.filters.http.ext_authz"
	// ServerDefaultPort is the default port to listen on.
	ServerDefaultPort = 5001
	// DefaultMetadataNamespace is the default namespace to use for the metadata.
	DefaultMetadataNamespace = "token_review"
	// DefaultSubKey is the default sub-key to use for the metadata.
	DefaultSubKey = "token"
	// DefaultAuthHeader is the default header to extract the token from.
	DefaultAuthHeader = "authorization"
)
View Source
const (
	AuthenticatedKey = "authenticated"
	UserKey          = "user"
	AudiencesKey     = "audiences"
)
View Source
const (
	Username = "username"
	UID      = "uid"
	Groups   = "groups"
	Extra    = "extra"
)

keys for userinfo

Variables

This section is empty.

Functions

func StatusToValue

func StatusToValue(key string, trs authv1.TokenReviewStatus) map[string]*structpb.Value

StatusToValue converts a TokenReview.Status to a structpb.Value referenced by the key.

Types

type Config

type Config struct {
	// ExtractTokenFromHeader determines what header to extract the token from.
	// If true, the token will be extracted from the Authorization header.
	ExtractTokenFromHeader string `json:"extract_token_from_header"`
	// MetadataNamespace is the namespace to use for the metadata.
	MetaDataNamespace string `json:"metadata_namespace"`
	// TokenKey is the key to use for the token in the metadata.
	TokenKey string `json:"token_key"`
}

Config is the configuration for the server.

Jump to

Keyboard shortcuts

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