ateletauthtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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 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.

Jump to

Keyboard shortcuts

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