Documentation ¶
Index ¶
- Constants
- func CheckCertificateChainOrder(t *testing.T, chain string)
- func CheckIfCertIsSigned(t *testing.T, clientCertStr, caCertStr string)
- func CheckIfChainContainsTwoCertificates(t *testing.T, certChain string)
- func CheckIfSubjectEquals(t *testing.T, expectedSubject, certificateStr string)
- func CreateCsr(strSubject string, keys *rsa.PrivateKey) (string, error)
- func CreateKey(t *testing.T) *rsa.PrivateKey
- func DecodeCertChain(t *testing.T, certificateChain string) []*x509.Certificate
- func GenerateKey() (*rsa.PrivateKey, error)
- func GetCertificateHash(t *testing.T, certificateStr string) string
- func ParseSubject(subject string) pkix.Name
- type ConfigmapCleaner
- type HydratorClient
- type Manager
- type TestConfig
Constants ¶
View Source
const ( RSAKeySize = 2048 RSAKey = "rsa2048" )
Variables ¶
This section is empty.
Functions ¶
func CheckCertificateChainOrder ¶
Certificate chain starts from leaf certificate and ends with a root certificate (https://tools.ietf.org/html/rfc5246#section-7.4.2). The correct certificate chain holds the following property: ith certificate in the chain is issued by (i+1)th certificate
func CheckIfCertIsSigned ¶
func CheckIfSubjectEquals ¶
func DecodeCertChain ¶
func DecodeCertChain(t *testing.T, certificateChain string) []*x509.Certificate
func GenerateKey ¶
func GenerateKey() (*rsa.PrivateKey, error)
func ParseSubject ¶
Types ¶
type ConfigmapCleaner ¶
type ConfigmapCleaner struct {
// contains filtered or unexported fields
}
func NewConfigMapCleaner ¶
func NewConfigMapCleaner(configListManager Manager, configMapName string) *ConfigmapCleaner
func (*ConfigmapCleaner) CleanRevocationList ¶
func (c *ConfigmapCleaner) CleanRevocationList(hash 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
type TestConfig ¶
type TestConfig struct { Tenant string `envconfig:"default=3e64ebae-38b5-46a0-b1ed-9ccee153a0ae"` ConnectorURL string `envconfig:"default=http://compass-connector:3000/graphql"` DirectorURL string `envconfig:"default=http://compass-director:3000/graphql"` ConnectorHydratorURL string `envconfig:"default=http://compass-connector:8080"` DirectorHydratorURL string `envconfig:"default=http://compass-director:8080"` CertificateDataHeader string `envconfig:"default=Certificate-Data"` RevocationConfigMapName string `envconfig:"default=revocations-config"` RevocationConfigMapNamespace string `envconfig:"default=compass-system"` }
func ReadConfig ¶
func ReadConfig() (TestConfig, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.