certgenerator

package
v0.0.0-...-88a9ed4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// The CA gets made using a helper in cert package provided in client-go. As such, it picks 0 for the CA serial - hence starting at 1 here.
	ApiServerCertSerial = iota + 1
	AuthnClientCertSerial
	AuthzClientCertSerial
)
View Source
const (
	CannotVerifyErrorMessageFragment = "This is usually caused by only half of the keypair left behind on disk." +
		"Try clearing the certs and retry"
)
View Source
const (
	// CertificateBlockType is a possible value for pem.Block.Type.
	CertificateBlockType = "CERTIFICATE"
)
View Source
const (
	DefaultAPIServerIp = "127.0.0.1"
)
View Source
const (
	RSAPrivateKeyBlockType = "RSA PRIVATE KEY"
)

Variables

This section is empty.

Functions

func NewSelfSignedCACert

func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, error)

NewSelfSignedCACert creates a CA certificate

Types

type AltNames

type AltNames struct {
	DNSNames []string
	IPs      []net.IP
}

AltNames contains the domain names and IP addresses that will be added to the API Server's x509 certificate SubAltNames field. The values will be passed directly to the x509.Certificate object.

type CertUtil

type CertUtil struct {
	K8sDataPath string
	// contains filtered or unexported fields
}

func (*CertUtil) APIServerCertFile

func (cu *CertUtil) APIServerCertFile() string

func (*CertUtil) APIServerKeyFile

func (cu *CertUtil) APIServerKeyFile() string

func (*CertUtil) CACertFile

func (cu *CertUtil) CACertFile() string

func (*CertUtil) CAKeyFile

func (cu *CertUtil) CAKeyFile() string

func (*CertUtil) EnsureApiServerPKI

func (cu *CertUtil) EnsureApiServerPKI(advertiseAddress string) error

func (*CertUtil) EnsureAuthnClientPKI

func (cu *CertUtil) EnsureAuthnClientPKI() error

func (*CertUtil) EnsureAuthzClientPKI

func (cu *CertUtil) EnsureAuthzClientPKI() error

func (*CertUtil) GetK8sCACert

func (cu *CertUtil) GetK8sCACert() (*x509.Certificate, error)

func (*CertUtil) InitializeCACertPKI

func (cu *CertUtil) InitializeCACertPKI() error

func (*CertUtil) K8sAuthnClientCertFile

func (cu *CertUtil) K8sAuthnClientCertFile() string

func (*CertUtil) K8sAuthnClientKeyFile

func (cu *CertUtil) K8sAuthnClientKeyFile() string

func (*CertUtil) K8sAuthzClientCertFile

func (cu *CertUtil) K8sAuthzClientCertFile() string

func (*CertUtil) K8sAuthzClientKeyFile

func (cu *CertUtil) K8sAuthzClientKeyFile() string

type Config

type Config struct {
	CommonName   string
	Organization []string
	AltNames     AltNames
	Usages       []x509.ExtKeyUsage
}

Config contains the basic fields required for creating a certificate

type Service

type Service struct {
	*services.BasicService
	// contains filtered or unexported fields
}

func CreateService

func CreateService(serviceName string, k8sDataPath string) (*Service, error)

type ServiceInterface

type ServiceInterface interface {
	services.NamedService
}

Jump to

Keyboard shortcuts

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