security

package
v0.0.0-...-e06a683 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltNames

type AltNames struct {
	DNSNames []string   `json:"dnsNames,omitempty"`
	IPs      []net.IP   `json:"ips,omitempty"`
	Emails   []string   `json:"emails,omitempty"`
	URIs     []*url.URL `json:"uris,omitempty"`
}

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 Security

type Security interface {
	// GetCA get self-signed root certificate crt
	GetCA() ([]byte, error)
	// IssueCertificate issuing sub-certificates through self-signed root certificates
	IssueCertificate(cn string, alt AltNames) (*pki.CertPem, error)
	// RevokeCertificate revoke certificate
	RevokeCertificate(cn string) error
	// RotateCertificate renew a certificate
	RotateCertificate(cn string) (*pki.CertPem, error)
}

func NewPKI

func NewPKI(cfg config.SecurityConfig, sto *bh.Store) (Security, error)

Jump to

Keyboard shortcuts

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