security

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TLSServerName = "cluster.local"
)

Variables

This section is empty.

Functions

func CertPool added in v0.6.0

func CertPool(certPem []byte) (*x509.CertPool, error)

func GetAPIToken added in v0.8.0

func GetAPIToken() string

GetAPIToken returns the value of the api token from an environment variable.

func GetAppToken added in v1.0.0

func GetAppToken() string

GetAppToken returns the value of the app api token from an environment variable.

func GetCertChain added in v0.6.0

func GetCertChain() (*credentials.CertChain, error)

Types

type Authenticator

type Authenticator interface {
	GetTrustAnchors() *x509.CertPool
	GetCurrentSignedCert() *SignedCertificate
	CreateSignedWorkloadCert(id, namespace, trustDomain string) (*SignedCertificate, error)
}

func GetSidecarAuthenticator

func GetSidecarAuthenticator(sentryAddress string, certChain *credentials.CertChain) (Authenticator, error)

GetSidecarAuthenticator returns a new authenticator with the extracted trust anchors.

type SignedCertificate

type SignedCertificate struct {
	WorkloadCert  []byte
	PrivateKeyPem []byte
	Expiry        time.Time
	TrustChain    *x509.CertPool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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