Documentation ¶
Index ¶
- Constants
- func AssertCertificate(t *testing.T, expectedSubject string, ...)
- func AssertConfiguration(t *testing.T, configuration externalschema.Configuration)
- func ChangeCommonName(subject, commonName string) string
- func Cleanup(t *testing.T, configmapCleaner *testkit.ConfigmapCleaner, ...)
- func CreateCertDataHeader(subject, hash string) string
- func GenerateApplicationCertificate(t *testing.T, directorClient *director.Client, ...) (externalschema.CertificationResult, externalschema.Configuration)
- func GenerateRuntimeCertificate(t *testing.T, token *externalschema.Token, connectorClient *TokenSecuredClient, ...) (externalschema.CertificationResult, externalschema.Configuration)
- func GetConfiguration(t *testing.T, directorClient *director.Client, ...) externalschema.Configuration
- type CertificateSecuredClient
- type CertificationResponse
- type ConfigurationResponse
- type HydratorClient
- type RevokeResult
- type TokenSecuredClient
Constants ¶
View Source
const (
TokenHeader = "Connector-Token"
)
Variables ¶
This section is empty.
Functions ¶
func AssertCertificate ¶
func AssertCertificate(t *testing.T, expectedSubject string, certificationResult externalschema.CertificationResult)
func AssertConfiguration ¶
func AssertConfiguration(t *testing.T, configuration externalschema.Configuration)
func ChangeCommonName ¶
func Cleanup ¶
func Cleanup(t *testing.T, configmapCleaner *testkit.ConfigmapCleaner, certificationResult externalschema.CertificationResult)
func CreateCertDataHeader ¶
func GenerateApplicationCertificate ¶
func GenerateApplicationCertificate(t *testing.T, directorClient *director.Client, 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, directorClient *director.Client, connectorClient *TokenSecuredClient, appID string) externalschema.Configuration
Types ¶
type CertificateSecuredClient ¶
type CertificateSecuredClient struct {
// 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 CertificationResponse ¶
type CertificationResponse struct {
Result externalschema.CertificationResult `json:"result"`
}
type ConfigurationResponse ¶
type ConfigurationResponse struct {
Result externalschema.Configuration `json:"result"`
}
type HydratorClient ¶
type HydratorClient struct {
*testkit.HydratorClient
}
func NewHydratorClient ¶
func NewHydratorClient(validatorURL string) *HydratorClient
func (*HydratorClient) ResolveCertificateData ¶
func (vc *HydratorClient) ResolveCertificateData(t *testing.T, headers map[string][]string) oathkeeper.AuthenticationSession
type RevokeResult ¶
type RevokeResult struct {
Result bool `json:"result"`
}
type TokenSecuredClient ¶
type TokenSecuredClient struct {
// contains filtered or unexported fields
}
func NewConnectorClient ¶
func NewConnectorClient(endpoint string) *TokenSecuredClient
func (*TokenSecuredClient) Configuration ¶
func (c *TokenSecuredClient) Configuration(token string, headers ...http.Header) (externalschema.Configuration, 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.