istio: Index | Files | Directories

package tokenmanager

import ""


Package Files

tokenmanager.go tokensource.go


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

func CreateTokenManager Uses

func CreateTokenManager(tokenManagerType string, config Config) stsservice.TokenManager

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

type Config Uses

type Config struct {
    CredFetcher security.CredFetcher
    TrustDomain string

type GCPProjectInfo Uses

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 Uses

func GetGCPProjectInfo() GCPProjectInfo

type Plugin Uses

type Plugin interface {
    ExchangeToken(parameters stsservice.StsRequestParameters) ([]byte, error)
    DumpPluginStatus() ([]byte, error)

Plugin provides common interfaces for specific token exchange services.

type TokenManager Uses

type TokenManager struct {
    // contains filtered or unexported fields

func (*TokenManager) DumpTokenStatus Uses

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

func (*TokenManager) GenerateToken Uses

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

func (*TokenManager) SetPlugin Uses

func (tm *TokenManager) SetPlugin(p Plugin)

SetPlugin sets token exchange plugin for testing purposes only.

type TokenSource Uses

type TokenSource struct {
    // contains filtered or unexported fields

TokenSource specifies an oauth token source based on STS token exchange.

func NewTokenSource Uses

func NewTokenSource(trustDomain, subjectToken, authScope string) *TokenSource

NewTokenSource creates a token source based on STS token exchange.

func (*TokenSource) RefreshSubjectToken Uses

func (ts *TokenSource) RefreshSubjectToken(subjectToken string)

RefreshSubjectToken sets subject token with new expiry.

func (*TokenSource) Token Uses

func (ts *TokenSource) Token() (*oauth2.Token, error)

Token returns Oauth token received from sts token exchange.



Package tokenmanager imports 11 packages (graph) and is imported by 3 packages. Updated 2021-01-02. Refresh now. Tools for package owners.