Documentation ¶
Index ¶
- Constants
- func CreateTokenManager(tokenManagerType string, config Config) (security.TokenManager, error)
- type Config
- type GCPProjectInfo
- type Plugin
- type TokenManager
- func (tm *TokenManager) DumpTokenStatus() ([]byte, error)
- func (tm *TokenManager) GenerateToken(parameters security.StsRequestParameters) ([]byte, error)
- func (tm *TokenManager) GetMetadata(forCA bool, xdsAuthProvider, token string) (map[string]string, error)
- func (tm *TokenManager) SetPlugin(p Plugin)
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 (*TokenManager) SetPlugin ¶
func (tm *TokenManager) SetPlugin(p Plugin)
SetPlugin sets token exchange plugin for testing purposes only.
Click to show internal directories.
Click to hide internal directories.