connector

package
v0.0.0-...-0e91422 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

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 ChangeCommonName(subject, commonName string) string

func Cleanup

func Cleanup(t *testing.T, configmapCleaner *testkit.ConfigmapCleaner, certificationResult externalschema.CertificationResult)

func CreateCertDataHeader

func CreateCertDataHeader(subject, hash string) string

func GenerateApplicationCertificate

func GenerateApplicationCertificate(t *testing.T, directorClient *director.Client, connectorClient *TokenSecuredClient, appID string, 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

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL