Documentation
¶
Overview ¶
Package ateletauthtest builds the peer contexts that the ateapi services served only to atelet authenticate against.
Index ¶
- func Cert(t *testing.T, spiffePath string, podIdentity *substratex509.PodIdentity) *x509.Certificate
- func CertIn(t *testing.T, namespace, nodeName string) *x509.Certificate
- func CertOn(t *testing.T, nodeName string) *x509.Certificate
- func ContextWith(cert *x509.Certificate) context.Context
- func PodIdentityIn(namespace, nodeName string) *substratex509.PodIdentity
- func PodIdentityOn(nodeName string) *substratex509.PodIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cert ¶
func Cert(t *testing.T, spiffePath string, podIdentity *substratex509.PodIdentity) *x509.Certificate
Cert returns a self-signed certificate carrying the given SPIFFE path and PodIdentity, either of which may be omitted to produce a certificate that authentication must reject.
func CertIn ¶ added in v0.2.0
func CertIn(t *testing.T, namespace, nodeName string) *x509.Certificate
CertIn returns the certificate of the atelet running on nodeName in namespace.
func CertOn ¶
func CertOn(t *testing.T, nodeName string) *x509.Certificate
CertOn returns the certificate of the atelet running on nodeName in the default install namespace.
func ContextWith ¶
func ContextWith(cert *x509.Certificate) context.Context
ContextWith injects cert as the transport-authenticated peer certificate. A nil cert yields a context with no peer information at all, which is what an unauthenticated call looks like.
func PodIdentityIn ¶ added in v0.2.0
func PodIdentityIn(namespace, nodeName string) *substratex509.PodIdentity
PodIdentityIn returns a well-formed atelet PodIdentity pinned to nodeName, for an atelet running in namespace.
func PodIdentityOn ¶
func PodIdentityOn(nodeName string) *substratex509.PodIdentity
PodIdentityOn returns a well-formed atelet PodIdentity pinned to nodeName, for an atelet running in the default install namespace.
Types ¶
This section is empty.