Documentation ¶
Index ¶
- Constants
- func GenerateApplicationCertificate(t *testing.T, client *CertSecuredGraphQLClient, ...) (externalschema.CertificationResult, externalschema.Configuration)
- func GenerateRuntimeCertificate(t *testing.T, token *externalschema.Token, connectorClient *TokenSecuredClient, ...) (externalschema.CertificationResult, externalschema.Configuration)
- func GetConfiguration(t *testing.T, client *CertSecuredGraphQLClient, ...) externalschema.Configuration
- func NewHttpClient(skipVerify bool) *http.Client
- func NewIntegrationSystemClient(ctx context.Context, intSystemCredentials *directorSchema.IntSysSystemAuth) (*http.Client, error)
- func NewK8SClientSet(ctx context.Context, interval, pollingTimeout, timeout time.Duration) (*kubernetes.Clientset, error)
- type ApplicationResponse
- type CertSecuredGraphQLClient
- type CertificateSecuredClient
- func (c *CertificateSecuredClient) Configuration(headers ...http.Header) (externalschema.Configuration, error)
- func (c *CertificateSecuredClient) RevokeCertificate() (bool, error)
- func (c *CertificateSecuredClient) SignCSR(csr string, headers ...http.Header) (externalschema.CertificationResult, error)
- type Client
- type ConnectorClient
- type Destination
- type DestinationClient
- func (c *DestinationClient) CreateDestination(t *testing.T, destination Destination, subaccountID string)
- func (c *DestinationClient) DeleteDestination(t *testing.T, destinationName, subaccountID string)
- func (c *DestinationClient) FindDestinationByName(t *testing.T, serviceURL, destinationName, authToken, userTokenHeader string, ...) json.RawMessage
- func (c *DestinationClient) GetDestinationCertificateByName(t *testing.T, serviceURL, certificateName, instanceID, token string, ...) json.RawMessage
- type DestinationServiceAPIConfig
- type DirectorClient
- func (c *DirectorClient) CleanupApplication(appID string) error
- func (c *DirectorClient) CleanupRuntime(runtimeID string) error
- func (c *DirectorClient) CreateApplication(in schema.ApplicationRegisterInput) (string, error)
- func (c *DirectorClient) CreateRuntime(in schema.RuntimeRegisterInput) (string, error)
- func (c *DirectorClient) DeleteApplicationLabel(applicationID, key string) error
- func (c *DirectorClient) GetOneTimeTokenUrl(appID string) (string, string, error)
- func (c *DirectorClient) SetApplicationLabel(applicationID, key, value string) error
- func (c *DirectorClient) SetDefaultEventing(runtimeID string, appID string, eventsBaseURL string) error
- func (c *DirectorClient) SetRuntimeLabel(runtimeID, key, value string) error
- type HydratorClient
- func (vc *HydratorClient) ExecuteHydratorRequest(t *testing.T, path string, headers map[string][]string) oathkeeper.AuthenticationSession
- func (vc *HydratorClient) ResolveCertificateData(t *testing.T, headers map[string][]string) oathkeeper.AuthenticationSession
- func (vc *HydratorClient) ResolveToken(t *testing.T, headers map[string][]string) oathkeeper.AuthenticationSession
- type OneTimeTokenResponse
- type RuntimeResponse
- type SecuredClient
- type SetDefaultAppEventingResponse
- type SetLabelResponse
- type TenantsResponse
- type TokenSecuredClient
- func (c *TokenSecuredClient) Configuration(token string, headers ...http.Header) (externalschema.Configuration, error)
- func (c *TokenSecuredClient) GenerateAndSignCert(t *testing.T, certConfig externalschema.Configuration) (*externalschema.CertificationResult, *rsa.PrivateKey, error)
- func (c *TokenSecuredClient) SignCSR(csr string, token string, headers ...http.Header) (externalschema.CertificationResult, error)
Constants ¶
View Source
const ( ApplicationHeader = "Application" GroupHeader = "Group" TenantHeader = "Tenant" Tenant = "testkit-tenant" Extensions = "" KeyAlgorithm = "rsa2048" )
View Source
const (
TokenHeader = "Connector-Token"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateApplicationCertificate ¶
func GenerateApplicationCertificate(t *testing.T, client *CertSecuredGraphQLClient, connectorClient *TokenSecuredClient, appID string, clientKey *rsa.PrivateKey) (externalschema.CertificationResult, externalschema.Configuration)
func GenerateRuntimeCertificate ¶
func GenerateRuntimeCertificate(t *testing.T, token *externalschema.Token, connectorClient *TokenSecuredClient, clientKey *rsa.PrivateKey) (externalschema.CertificationResult, externalschema.Configuration)
func GetConfiguration ¶
func GetConfiguration(t *testing.T, client *CertSecuredGraphQLClient, connectorClient *TokenSecuredClient, appID string) externalschema.Configuration
func NewHttpClient ¶
func NewIntegrationSystemClient ¶
func NewIntegrationSystemClient(ctx context.Context, intSystemCredentials *directorSchema.IntSysSystemAuth) (*http.Client, error)
func NewK8SClientSet ¶
Types ¶
type ApplicationResponse ¶
type ApplicationResponse struct {
Result schema.ApplicationExt `json:"result"`
}
type CertSecuredGraphQLClient ¶
type CertSecuredGraphQLClient struct { CertSecuredGraphqlClient *gcli.Client // contains filtered or unexported fields }
func NewCertSecuredGraphQLClient ¶
func NewCertSecuredGraphQLClient(ctx context.Context, url, tenant string, key crypto.PrivateKey, certChain [][]byte, skipSSLValidation bool) (*CertSecuredGraphQLClient, error)
func (*CertSecuredGraphQLClient) GenerateApplicationToken ¶
func (c *CertSecuredGraphQLClient) GenerateApplicationToken(t *testing.T, appID string) (externalschema.Token, error)
func (*CertSecuredGraphQLClient) GenerateRuntimeToken ¶
func (c *CertSecuredGraphQLClient) GenerateRuntimeToken(t *testing.T, runtimeID string) (externalschema.Token, error)
type CertificateSecuredClient ¶
type CertificateSecuredClient struct { GraphQlClient *gcli.Client // contains filtered or unexported fields }
func NewCertificateSecuredConnectorClient ¶
func NewCertificateSecuredConnectorClient(endpoint string, key *rsa.PrivateKey, certificates ...*x509.Certificate) *CertificateSecuredClient
func (*CertificateSecuredClient) Configuration ¶
func (c *CertificateSecuredClient) Configuration(headers ...http.Header) (externalschema.Configuration, error)
func (*CertificateSecuredClient) RevokeCertificate ¶
func (c *CertificateSecuredClient) RevokeCertificate() (bool, error)
func (*CertificateSecuredClient) SignCSR ¶
func (c *CertificateSecuredClient) SignCSR(csr string, headers ...http.Header) (externalschema.CertificationResult, error)
type Client ¶
type Client interface { CreateRuntime(in schema.RuntimeRegisterInput) (string, error) CleanupRuntime(runtimeID string) error SetRuntimeLabel(runtimeID, key, value string) error CreateApplication(in schema.ApplicationRegisterInput) (string, error) CleanupApplication(appID string) error SetApplicationLabel(applicationID, key, value string) error DeleteApplicationLabel(applicationID, key string) error SetDefaultEventing(runtimeID string, appID string, eventsBaseURL string) error GetOneTimeTokenUrl(appID string) (string, string, error) }
type ConnectorClient ¶
type ConnectorClient interface { CreateToken(t *testing.T) model.TokenResponse GetInfo(t *testing.T, url string) (*model.InfoResponse, *model.Error) CreateCertChain(t *testing.T, csr, url string) (*model.CrtResponse, *model.Error) }
func NewConnectorClient ¶
func NewConnectorClient(directorClient Client, appID, tenant string, skipVerify bool) ConnectorClient
type Destination ¶
type Destination struct { Name string `json:"Name"` Type string `json:"Type"` URL string `json:"URL"` Authentication string `json:"Authentication"` XCorrelationID string `json:"correlationIds"` XSystemTenantID string `json:"x-system-id"` XSystemTenantName string `json:"x-system-name"` XSystemType string `json:"x-system-type"` }
type DestinationClient ¶
type DestinationClient struct {
// contains filtered or unexported fields
}
func NewDestinationClient ¶
func NewDestinationClient(instanceConfig config.InstanceConfig, apiConfig DestinationServiceAPIConfig, subdomain string) (*DestinationClient, error)
func (*DestinationClient) CreateDestination ¶
func (c *DestinationClient) CreateDestination(t *testing.T, destination Destination, subaccountID string)
func (*DestinationClient) DeleteDestination ¶
func (c *DestinationClient) DeleteDestination(t *testing.T, destinationName, subaccountID string)
func (*DestinationClient) FindDestinationByName ¶
func (c *DestinationClient) FindDestinationByName(t *testing.T, serviceURL, destinationName, authToken, userTokenHeader string, expectedStatusCode int) json.RawMessage
func (*DestinationClient) GetDestinationCertificateByName ¶
func (c *DestinationClient) GetDestinationCertificateByName(t *testing.T, serviceURL, certificateName, instanceID, token string, expectedStatusCode int) json.RawMessage
type DestinationServiceAPIConfig ¶
type DestinationServiceAPIConfig struct { EndpointDestinationsFindAPI string `envconfig:"APP_ENDPOINT_DESTINATIONS_FIND_API,default=/destination-configuration/local/v1/destinations"` EndpointTenantSubaccountLevelDestinations string `envconfig:"APP_ENDPOINT_TENANT_DESTINATIONS,default=/destination-configuration/v1/subaccountDestinations"` EndpointTenantSubaccountLevelDestinationCertificates string `envconfig:"APP_ENDPOINT_TENANT_DESTINATION_CERTIFICATES,default=/destination-configuration/v1/subaccountCertificates"` EndpointTenantInstanceLevelDestinationCertificates string `` /* 130-byte string literal not displayed */ Timeout time.Duration `envconfig:"APP_DESTINATIONS_TIMEOUT,default=30s"` SkipSSLVerify bool `envconfig:"APP_DESTINATIONS_SKIP_SSL_VERIFY,default=false"` OAuthTokenPath string `envconfig:"APP_DESTINATION_OAUTH_TOKEN_PATH,default=/oauth/token"` }
type DirectorClient ¶
type DirectorClient struct {
// contains filtered or unexported fields
}
func (*DirectorClient) CleanupApplication ¶
func (c *DirectorClient) CleanupApplication(appID string) error
func (*DirectorClient) CleanupRuntime ¶
func (c *DirectorClient) CleanupRuntime(runtimeID string) error
func (*DirectorClient) CreateApplication ¶
func (c *DirectorClient) CreateApplication(in schema.ApplicationRegisterInput) (string, error)
func (*DirectorClient) CreateRuntime ¶
func (c *DirectorClient) CreateRuntime(in schema.RuntimeRegisterInput) (string, error)
func (*DirectorClient) DeleteApplicationLabel ¶
func (c *DirectorClient) DeleteApplicationLabel(applicationID, key string) error
func (*DirectorClient) GetOneTimeTokenUrl ¶
func (c *DirectorClient) GetOneTimeTokenUrl(appID string) (string, string, error)
func (*DirectorClient) SetApplicationLabel ¶
func (c *DirectorClient) SetApplicationLabel(applicationID, key, value string) error
func (*DirectorClient) SetDefaultEventing ¶
func (c *DirectorClient) SetDefaultEventing(runtimeID string, appID string, eventsBaseURL string) error
func (*DirectorClient) SetRuntimeLabel ¶
func (c *DirectorClient) SetRuntimeLabel(runtimeID, key, value string) error
type HydratorClient ¶
type HydratorClient struct {
// contains filtered or unexported fields
}
func NewHydratorClient ¶
func NewHydratorClient(validatorURL string) *HydratorClient
func (*HydratorClient) ExecuteHydratorRequest ¶
func (vc *HydratorClient) ExecuteHydratorRequest(t *testing.T, path string, headers map[string][]string) oathkeeper.AuthenticationSession
func (*HydratorClient) ResolveCertificateData ¶
func (vc *HydratorClient) ResolveCertificateData(t *testing.T, headers map[string][]string) oathkeeper.AuthenticationSession
func (*HydratorClient) ResolveToken ¶
func (vc *HydratorClient) ResolveToken(t *testing.T, headers map[string][]string) oathkeeper.AuthenticationSession
type OneTimeTokenResponse ¶
type OneTimeTokenResponse struct {
Result schema.OneTimeTokenForApplication `json:"result"`
}
type RuntimeResponse ¶
type SecuredClient ¶
type SecuredClient interface { GetMgmInfo(t *testing.T, url string) (*testModel.ManagementInfoResponse, *testModel.Error) RenewCertificate(t *testing.T, url string, csr string) (*testModel.CrtResponse, *testModel.Error) RevokeCertificate(t *testing.T, url string) *testModel.Error ListServices(t *testing.T, url string) ([]model.Service, *testModel.Error) CreateService(t *testing.T, url string, service model.ServiceDetails) (*testModel.CreateServiceResponse, *testModel.Error) GetService(t *testing.T, url string, id string) (*model.ServiceDetails, *testModel.Error) UpdateService(t *testing.T, url string, id string, service model.ServiceDetails) (*model.ServiceDetails, *testModel.Error) DeleteService(t *testing.T, url string, id string) *testModel.Error CleanupService(t *testing.T, url string, id string) *testModel.Error }
func NewSecuredClient ¶
func NewSecuredClient(skipVerify bool, key *rsa.PrivateKey, certs []byte, tenant string) (SecuredClient, error)
type SetDefaultAppEventingResponse ¶
type SetDefaultAppEventingResponse struct {
Result schema.ApplicationEventingConfiguration `json:"result"`
}
type SetLabelResponse ¶
type TenantsResponse ¶
type TokenSecuredClient ¶
type TokenSecuredClient struct {
// contains filtered or unexported fields
}
func NewTokenSecuredClient ¶
func NewTokenSecuredClient(endpoint string) *TokenSecuredClient
func (*TokenSecuredClient) Configuration ¶
func (c *TokenSecuredClient) Configuration(token string, headers ...http.Header) (externalschema.Configuration, error)
func (*TokenSecuredClient) GenerateAndSignCert ¶
func (c *TokenSecuredClient) GenerateAndSignCert(t *testing.T, certConfig externalschema.Configuration) (*externalschema.CertificationResult, *rsa.PrivateKey, error)
func (*TokenSecuredClient) SignCSR ¶
func (c *TokenSecuredClient) SignCSR(csr string, token string, headers ...http.Header) (externalschema.CertificationResult, error)
Click to show internal directories.
Click to hide internal directories.