Documentation
¶
Overview ¶
Package ateletauthtest builds the peer contexts that the ateapi services served only to atelet authenticate against.
Index ¶
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 CertOn ¶
func CertOn(t *testing.T, nodeName string) *x509.Certificate
CertOn returns the certificate of the atelet running on nodeName.
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 PodIdentityOn ¶
func PodIdentityOn(nodeName string) *substratex509.PodIdentity
PodIdentityOn returns a well-formed atelet PodIdentity pinned to nodeName.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.