istio: istio.io/istio/security/pkg/stsservice/test Index | Files | Directories

package test

import "istio.io/istio/security/pkg/stsservice/test"

Index

Package Files

setup.go

func WriteDataToFile Uses

func WriteDataToFile(path string, content string) error

WriteDataToFile writes data into file

type Env Uses

type Env struct {
    ProxySetup *istioEnv.TestSetup
    AuthServer *tokenBackend.AuthorizationServer

    ProxyListenerPort int
    // contains filtered or unexported fields
}

Env manages test setup and teardown.

func SetupTest Uses

func SetupTest(t *testing.T, cb *xdsService.XDSCallbacks, testID uint16, enableCache bool) *Env

SetupTest starts Envoy, XDS server, STS server, token manager, and a token service backend. Envoy loads a test config that requires token credential to access XDS server. That token credential is provisioned by STS server. enableCache indicates whether to enable token cache at STS server side. Here is a map between ports and servers auth server : ExtraPort STS server : STSPort Dynamic proxy listener : ClientProxyPort Static proxy listener : TCPProxyPort XDS server : DiscoveryPort test backend : BackendPort proxy admin : AdminPort

func (*Env) ClearTokenCache Uses

func (e *Env) ClearTokenCache()

ClearTokenCache removes cached token in token exchange plugin.

func (*Env) DumpPortMap Uses

func (e *Env) DumpPortMap(t *testing.T)

DumpPortMap dumps port allocation status auth server : ExtraPort STS server : STSPort Dynamic proxy listener : ClientProxyPort Static proxy listener : TCPProxyPort XDS server : DiscoveryPort test backend : BackendPort proxy admin : AdminPort

func (*Env) StartProxy Uses

func (e *Env) StartProxy(t *testing.T)

StartProxy starts proxy.

func (*Env) TearDown Uses

func (e *Env) TearDown()

TearDown shuts down all the components.

func (*Env) WaitForStsFlowReady Uses

func (e *Env) WaitForStsFlowReady(t *testing.T)

WaitForStsFlowReady sends STS requests to STS server using HTTP client, and verifies that the STS flow is ready.

Directories

PathSynopsis
failure_sts_token_fetch
proxy_cached_sts_token
renew_sts_token
server_cached_short_lived_sts_token
server_cached_sts_token
sts_fetch_timeout
success_sts

Package test imports 19 packages (graph). Updated 2020-11-26. Refresh now. Tools for package owners.