identity

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package identity creates and validates Podmin agent certificates.

Index

Constants

View Source
const (
	// ClusterCAPathSuffix is the reserved cluster CA parameter suffix.
	ClusterCAPathSuffix = "/_system/cluster-ca"
)

Variables

This section is empty.

Functions

func Generate

func Generate(cluster string) ([]byte, error)

Generate creates a long-lived Ed25519 cluster CA as a versioned JSON secret.

Types

type Authority

type Authority struct {
	// contains filtered or unexported fields
}

Authority is a validated cluster certificate authority.

func Load

func Load(value []byte, cluster string) (*Authority, error)

Load parses and validates a cluster CA secret, including its key match and CA constraints.

func (*Authority) TLSConfigs

func (a *Authority) TLSConfigs(cluster, nodeID, nodeGroup string, address netip.Addr) (*tls.Config, *tls.Config, error)

TLSConfigs returns distinct TLS 1.3 client and server configurations with an automatically renewed in-memory node certificate.

type NodeIdentity

type NodeIdentity struct {
	NodeID    string
	NodeGroup string
}

NodeIdentity is an authenticated Podmin node identity.

func IdentityFromContext

func IdentityFromContext(ctx context.Context, cluster string) (NodeIdentity, error)

IdentityFromContext extracts a node identity from a verified gRPC TLS peer and exact cluster trust domain.

Jump to

Keyboard shortcuts

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