istio: istio.io/istio/security/pkg/credentialfetcher/plugin Index | Files

package plugin

import "istio.io/istio/security/pkg/credentialfetcher/plugin"

This is Google plugin of credentialfetcher.

Test only: this is the mock plugin of credentialfetcher.

Index

Package Files

gce.go mock.go

type GCEPlugin Uses

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

The plugin object.

func CreateGCEPlugin Uses

func CreateGCEPlugin(audience, jwtPath, identityProvider string) *GCEPlugin

CreateGCEPlugin creates a Google credential fetcher plugin. Return the pointer to the created plugin.

func (*GCEPlugin) GetIdentityProvider Uses

func (p *GCEPlugin) GetIdentityProvider() string

GetIdentityProvider returns the name of the identity provider that can authenticate the workload credential. GCE idenity provider is named "GoogleComputeEngine".

func (*GCEPlugin) GetPlatformCredential Uses

func (p *GCEPlugin) GetPlatformCredential() (string, error)

GetPlatformCredential fetches the GCE VM identity jwt token from its metadata server, and write it to jwtPath. The local copy of the token in jwtPath is used by both Envoy STS client and istio agent to fetch certificate and access token. Note: this function only works in a GCE VM environment.

func (*GCEPlugin) GetType Uses

func (p *GCEPlugin) GetType() string

GetType returns credential fetcher type.

type MockPlugin Uses

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

The plugin object.

func CreateMockPlugin Uses

func CreateMockPlugin(token string) *MockPlugin

CreateMockPlugin creates a mock credential fetcher plugin. Return the pointer to the created plugin.

func (*MockPlugin) GetIdentityProvider Uses

func (p *MockPlugin) GetIdentityProvider() string

GetIdentityProvider returns the name of the identity provider that can authenticate the workload credential.

func (*MockPlugin) GetPlatformCredential Uses

func (p *MockPlugin) GetPlatformCredential() (string, error)

GetPlatformCredential returns a constant token string.

func (*MockPlugin) GetType Uses

func (p *MockPlugin) GetType() string

GetType returns credential fetcher type.

Package plugin imports 5 packages (graph) and is imported by 1 packages. Updated 2020-11-07. Refresh now. Tools for package owners.