import "istio.io/istio/security/pkg/stsservice/tokenmanager/google"
const (
GCPAuthProvider = "gcp"
)
var ( GCEProvider = "GoogleComputeEngine" // GKEClusterURL is the URL to send requests to the token exchange service. GKEClusterURL = env.RegisterStringVar("GKE_CLUSTER_URL", "", "The url of GKE cluster").Get() )
type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years Seconds int64 `json:"seconds"` }
type Plugin struct {
// contains filtered or unexported fields
}
Plugin supports token exchange with Google OAuth 2.0 authorization server.
func CreateTokenManagerPlugin(credFetcher security.CredFetcher, trustDomain, gcpProjectNumber, gkeClusterURL string, enableCache bool) (*Plugin, error)
CreateTokenManagerPlugin creates a plugin that fetches token from a Google OAuth 2.0 authorization server.
ClearCache is only used for testing purposes.
DumpTokenStatus dumps all token status in JSON
GenerateToken takes STS request parameters and fetches token, returns StsResponseParameters in JSON.
GetGcpProjectNumber returns the GCP project number
GetMetadata returns the metadata headers related to the token
SetEndpoints changes the endpoints for testing purposes only.
Path | Synopsis |
---|---|
mock |
Package google imports 16 packages (graph) and is imported by 2 packages. Updated 2021-01-16. Refresh now. Tools for package owners.