secrets

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaProvider

type CaProvider interface {
	// Get returns all PEM encoded CAs, a list of CAs that were used to generate a secret and an error.
	Get(context.Context, *core_mesh.MeshResource) (*core_xds.CaSecret, []string, error)
}

func NewCaProvider

func NewCaProvider(caManagers core_ca.Managers, metrics core_metrics.Metrics) (CaProvider, error)

type ChangeKind

type ChangeKind int
const (
	IdentityChange ChangeKind = iota
	OwnMeshChange
	OtherMeshChange
)

type Identity

type Identity struct {
	Mesh     string
	Name     string
	Services mesh_proto.MultiValueTagSet
}

type IdentityProvider

type IdentityProvider interface {
	// Get returns PEM encoded cert + key, backend that was used to generate this pair and an error.
	Get(context.Context, Identity, *core_mesh.MeshResource) (*core_xds.IdentitySecret, string, error)
}

func NewIdentityProvider

func NewIdentityProvider(caManagers core_ca.Managers, metrics core_metrics.Metrics) (IdentityProvider, error)

type Info

type Info struct {
	Expiration time.Time
	Generation time.Time

	Tags mesh_proto.MultiValueTagSet

	IssuedBackend     string
	SupportedBackends []string

	OwnMesh        MeshInfo
	OtherMeshInfos []MeshInfo
	// contains filtered or unexported fields
}

func (*Info) CertLifetime

func (c *Info) CertLifetime() time.Duration

func (*Info) ExpiringSoon

func (c *Info) ExpiringSoon() bool

type MeshCa

type MeshCa struct {
	Mesh     string
	CaSecret *core_xds.CaSecret
}

type MeshInfo

type MeshInfo struct {
	MTLS *mesh_proto.Mesh_Mtls
}

type Secrets

type Secrets interface {
	GetForDataPlane(dataplane *core_mesh.DataplaneResource, mesh *core_mesh.MeshResource, otherMeshes []*core_mesh.MeshResource) (*core_xds.IdentitySecret, map[string]*core_xds.CaSecret, error)
	GetForZoneEgress(zoneEgress *core_mesh.ZoneEgressResource, mesh *core_mesh.MeshResource) (*core_xds.IdentitySecret, *core_xds.CaSecret, error)
	GetAllInOne(mesh *core_mesh.MeshResource, dataplane *core_mesh.DataplaneResource, otherMeshes []*core_mesh.MeshResource) (*core_xds.IdentitySecret, *core_xds.CaSecret, error)
	Info(dpKey model.ResourceKey) *Info
	Cleanup(dpKey model.ResourceKey)
}

func NewSecrets

func NewSecrets(caProvider CaProvider, identityProvider IdentityProvider, metrics metrics.Metrics) (Secrets, error)

type UpdateKinds

type UpdateKinds map[ChangeKind]struct{}

func UpdateEverything

func UpdateEverything() UpdateKinds

func (UpdateKinds) AddKind

func (kinds UpdateKinds) AddKind(kind ChangeKind)

func (UpdateKinds) HasType

func (kinds UpdateKinds) HasType(kind ChangeKind) bool

Jump to

Keyboard shortcuts

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