import "istio.io/istio/security/pkg/stsservice/test"
WriteDataToFile writes data into file
type Env struct { ProxySetup *istioEnv.TestSetup AuthServer *tokenBackend.AuthorizationServer ProxyListenerPort int // contains filtered or unexported fields }
Env manages test setup and teardown.
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
ClearTokenCache removes cached token in token exchange plugin.
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
StartProxy starts proxy.
TearDown shuts down all the components.
WaitForStsFlowReady sends STS requests to STS server using HTTP client, and verifies that the STS flow is ready.
Path | Synopsis |
---|---|
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.