substratex509

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package substratex509 contains routines for creating and parsing x509 certificates that embed Substrate-specific X.509 extensions communicating the identity of a given workload. It is modeled on the upstream Kubernetes component-helpers/kubernetesx509 package, but encodes extension values as JSON instead of ASN.1.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GoogleSubstratePEN is the ASN.1 Private Enterprise Number arc used to
	// name X.509 extensions that communicate Substrate-specific concepts.
	GoogleSubstratePEN = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 11129, 2, 12}
)

Functions

func AddActorIdentityToCertificate

func AddActorIdentityToCertificate(actor *ActorIdentity, template *x509.Certificate) error

func AddPodIdentityToCertificate

func AddPodIdentityToCertificate(pod *PodIdentity, template *x509.Certificate) error

Types

type ActorIdentity

type ActorIdentity struct {
	Atespace  string
	ActorName string
	ActorUid  string
	Purpose   ActorIdentityPurpose
}

func ActorIdentityFromCertificate

func ActorIdentityFromCertificate(cert *x509.Certificate) (*ActorIdentity, error)

type ActorIdentityPurpose

type ActorIdentityPurpose string

ActorIdentity is the Substrate Actor Identity of an Actor, as embedded in the oidActorIdentity extension of its certificate.

const ActorIdentityPurposeAtunnel ActorIdentityPurpose = "atunnel"

type PodIdentity

type PodIdentity struct {
	Namespace          string
	ServiceAccountName string
	ServiceAccountUID  string
	PodName            string
	PodUID             string
	NodeName           string
	NodeUID            string
}

PodIdentity is the Kubernetes Pod Identity of a pod, as embedded in the oidPodIdentity extension of its certificate.

func PodIdentityFromCertificate

func PodIdentityFromCertificate(cert *x509.Certificate) (*PodIdentity, error)

Jump to

Keyboard shortcuts

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