crypto

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEnvoyGatewayDNSPrefix defines the default Envoy Gateway DNS prefix.
	DefaultEnvoyGatewayDNSPrefix = config.EnvoyGatewayServiceName

	// DefaultEnvoyDNSPrefix defines the default Envoy DNS prefix.
	DefaultEnvoyDNSPrefix = "*"

	// DefaultCertificateLifetime holds the default certificate lifetime (in days).
	DefaultCertificateLifetime = 365 * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertProvider

type CertProvider struct {
	// Type is the type of provider to use for managing certificates.
	Type ProviderType `json:"type"`
}

CertProvider defines the provider of certificates.

type Certificates

type Certificates struct {
	CACertificate             []byte
	EnvoyGatewayCertificate   []byte
	EnvoyGatewayPrivateKey    []byte
	EnvoyCertificate          []byte
	EnvoyPrivateKey           []byte
	EnvoyRateLimitCertificate []byte
	EnvoyRateLimitPrivateKey  []byte
	OIDCHMACSecret            []byte
}

Certificates contains a set of Certificates as []byte each holding the CA Cert along with Envoy Gateway & Envoy certificates.

func GenerateCerts

func GenerateCerts(cfg *config.Server) (*Certificates, error)

GenerateCerts generates a CA Certificate along with certificates for Envoy Gateway and Envoy returning them as a *Certificates struct or error if encountered.

type Configuration

type Configuration struct {
	// Provider defines the desired cert provider and provider-specific
	// configuration.
	Provider *CertProvider
}

Configuration holds config parameters used for generating certificates.

type ProviderType

type ProviderType string

ProviderType defines the types of supported certificate providers.

const (
	// ProviderTypeEnvoyGateway defines the "EnvoyGateway" provider.
	// EnvoyGateway implements a self-signed CA and generates server
	// certs for Envoy Gateway and Envoy.
	ProviderTypeEnvoyGateway ProviderType = "EnvoyGateway"
)

Jump to

Keyboard shortcuts

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