tokenmanager

package
v0.0.0-...-d428879 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GoogleTokenExchange is the name of the google token exchange service.
	GoogleTokenExchange = "GoogleTokenExchange"
)

Variables

This section is empty.

Functions

func CreateTokenManager

func CreateTokenManager(tokenManagerType string, config Config) (security.TokenManager, error)

CreateTokenManager creates a token manager with specified type and returns that token manager

Types

type Config

type Config struct {
	CredFetcher security.CredFetcher
	TrustDomain string
}

type GCPProjectInfo

type GCPProjectInfo struct {
	Number string
	// contains filtered or unexported fields
}

GCPProjectInfo stores GCP project information, including project number, project ID, cluster location, cluster name

func GetGCPProjectInfo

func GetGCPProjectInfo() GCPProjectInfo

type Plugin

type Plugin interface {
	ExchangeToken(parameters security.StsRequestParameters) ([]byte, error)
	DumpPluginStatus() ([]byte, error)
	// GetMetadata returns the metadata headers related to the token
	GetMetadata(forCA bool, xdsAuthProvider, token string) (map[string]string, error)
}

Plugin provides common interfaces for specific token exchange services.

type TokenManager

type TokenManager struct {
	// contains filtered or unexported fields
}

func (*TokenManager) DumpTokenStatus

func (tm *TokenManager) DumpTokenStatus() ([]byte, error)

func (*TokenManager) GenerateToken

func (tm *TokenManager) GenerateToken(parameters security.StsRequestParameters) ([]byte, error)

func (*TokenManager) GetMetadata

func (tm *TokenManager) GetMetadata(forCA bool, xdsAuthProvider, token string) (map[string]string, error)

func (*TokenManager) SetPlugin

func (tm *TokenManager) SetPlugin(p Plugin)

SetPlugin sets token exchange plugin for testing purposes only.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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