controllers

package
v0.0.0-...-b5d6717 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileOwnerLabel   = "fdo.serviceinfo.file/owner"
	FileKey          = "fdo.serviceinfo.file/name"
	PathKey          = "fdo.serviceinfo.file/path"
	PermissionsKey   = "fdo.serviceinfo.file/permissions"
	FilePathTemplate = "/etc/fdo/files/%s/%s"
)
View Source
const ServiceInfoAuthToken = "ExampleAuthToken"

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	DNSName   string `yaml:"dns_name,omitempty"`
	IPAddress string `yaml:"ip_address,omitempty"`
}

type BearerToken

type BearerToken struct {
	Token string `yaml:"token,omitempty"`
}

type DIUN

type DIUN struct {
	KeyPath  string `yaml:"key_path"`
	CertPath string `yaml:"cert_path"`
	// Allowed values: SECP256R1 or SECP384R1
	KeyType       string `yaml:"key_type"`
	MFGStringType string `yaml:"mfg_string_type"`
	// Allowed values: FileSystem, Tpm
	AllowedKeyStorageTypes []string `yaml:"allowed_key_storage_types"`
}

type Directory

type Directory struct {
	Path string `yaml:"path,omitempty"`
}

type Driver

type Driver struct {
	Directory *Directory `yaml:"Directory,omitempty"`
}

func NewDriver

func NewDriver(path string) *Driver

type FDOManufacturingServerReconciler

type FDOManufacturingServerReconciler struct {
	util.ReconcilerBase
	Log logr.Logger
}

FDOManufacturingServerReconciler reconciles a FDOManufacturingServer object

func (*FDOManufacturingServerReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the FDOManufacturingServer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*FDOManufacturingServerReconciler) SetupWithManager

func (r *FDOManufacturingServerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type FDOOnboardingServerReconciler

type FDOOnboardingServerReconciler struct {
	util.ReconcilerBase
	Log logr.Logger
}

FDOOnboardingServerReconciler reconciles a FDOOnboardingServer object

func (*FDOOnboardingServerReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the FDOOnboardingServer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*FDOOnboardingServerReconciler) SetupWithManager

func (r *FDOOnboardingServerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type FDORendezvousServerReconciler

type FDORendezvousServerReconciler struct {
	util.ReconcilerBase
	Log logr.Logger
}

FDORendezvousServerReconciler reconciles a FDORendezvousServer object

func (*FDORendezvousServerReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the FDORendezvousServer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*FDORendezvousServerReconciler) SetupWithManager

func (r *FDORendezvousServerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type FDOServiceType

type FDOServiceType string
const (
	ManufacturingServiceType   FDOServiceType = "manufacturing"
	OwnerOnboardingServiceType FDOServiceType = "owner-onboarding"
	RendezvousServiceType      FDOServiceType = "rendezvous"
)

type Manufacturing

type Manufacturing struct {
	ManufacturerCertPath   string `yaml:"manufacturer_cert_path"`
	ManufacturerPrivateKey string `yaml:"manufacturer_private_key"`
	OwnerCertPath          string `yaml:"owner_cert_path"`
	DeviceCertCAPrivateKey string `yaml:"device_cert_ca_private_key"`
	DeviceCertCAChain      string `yaml:"device_cert_ca_chain"`
}

type ManufacturingServerConfig

type ManufacturingServerConfig struct {
	SessionStoreDriver          *Driver          `yaml:"session_store_driver"`
	OwnerShipVoucherStoreDriver *Driver          `yaml:"ownership_voucher_store_driver"`
	PublicKeyStoreDriver        *Driver          `yaml:"public_key_store_driver"`
	Bind                        string           `yaml:"bind"`
	RendezvousInfo              []RendezvousInfo `yaml:"rendezvous_info"`
	Protocols                   *Protocols       `yaml:"protocols"`
	Manufacturing               *Manufacturing   `yaml:"manufacturing"`
}

type OwnerAddress

type OwnerAddress struct {
	Transport string    `yaml:"transport"`
	Port      uint16    `yaml:"port"`
	Addresses []Address `yaml:"addresses"`
}

type OwnerOnboardingServerConfig

type OwnerOnboardingServerConfig struct {
	SessionStoreDriver           *Driver                       `yaml:"session_store_driver"`
	OwnerShipVoucherStoreDriver  *Driver                       `yaml:"ownership_voucher_store_driver"`
	Bind                         string                        `yaml:"bind"`
	TrustedDeviceKeysPath        string                        `yaml:"trusted_device_keys_path"`
	OwnerPrivateKeyPath          string                        `yaml:"owner_private_key_path"`
	OwnerPublicKeyPath           string                        `yaml:"owner_public_key_path"`
	OwnerAddresses               []OwnerAddress                `yaml:"owner_addresses"`
	ReportToRendezvousEndpoint   bool                          `yaml:"report_to_rendezvous_endpoint_enabled"`
	ServiceInfoAPIURL            string                        `yaml:"service_info_api_url"`
	ServiceInfoAPIAuthentication *ServiceInfoAPIAuthentication `yaml:"service_info_api_authentication"`
}

type Protocols

type Protocols struct {
	PlainDI bool  `yaml:"plain_di"`
	DIUN    *DIUN `yaml:"diun,omitempty"`
}

type RendezvousInfo

type RendezvousInfo struct {
	DNS        string `yaml:"dns,omitempty"`
	IPAddress  string `yaml:"ipaddress,omitempty"`
	DevicePort uint16 `yaml:"device_port,omitempty"`
	OwnerPort  uint16 `yaml:"owner_port,omitempty"`
	Protocol   string `yaml:"protocol,omitempty"`
}

type RendezvousServerConfig

type RendezvousServerConfig struct {
	StorageDriver               *Driver `yaml:"storage_driver"`
	SessionStoreDriver          *Driver `yaml:"session_store_driver"`
	Bind                        string  `yaml:"bind"`
	TrustedManufacturerKeysPath string  `yaml:"trusted_manufacturer_keys_path"`
}

type ServiceInfo

type ServiceInfo struct {
	InitialUser            *ServiceInfoInitialUser           `yaml:"initial_user,omitempty"`
	Files                  []ServiceInfoFile                 `yaml:"files,omitempty"`
	Commands               []ServiceInfoCommand              `yaml:"commands,omitempty"`
	DiskEncryptionClevises []ServiceInfoDiskEncryptionClevis `yaml:"diskencryption_clevis,omitempty"`
}

type ServiceInfoAPIAuthentication

type ServiceInfoAPIAuthentication struct {
	BearerToken *BearerToken `yaml:"BearerToken,omitempty"`
}

func NewServiceInfoAPIAuthentication

func NewServiceInfoAPIAuthentication(token string) *ServiceInfoAPIAuthentication

type ServiceInfoAPIServerConfig

type ServiceInfoAPIServerConfig struct {
	Bind                      string       `yaml:"bind"`
	DeviceSpecificStoreDriver *Driver      `yaml:"device_specific_store_driver"`
	ServiceInfoAuthToken      string       `yaml:"service_info_auth_token"`
	ServiceInfoAdminAuthToken string       `yaml:"admin_auth_token,omitempty"`
	ServiceInfo               *ServiceInfo `yaml:"service_info"`
}

type ServiceInfoCommand

type ServiceInfoCommand struct {
	Command      string   `yaml:"command"`
	Args         []string `yaml:"args"`
	MayFail      bool     `yaml:"may_fail"`
	ReturnStdOut bool     `yaml:"return_stdout"`
	ReturnStdErr bool     `yaml:"return_stderr"`
}

type ServiceInfoDiskEncryptionClevis

type ServiceInfoDiskEncryptionClevis struct {
	DiskLabel string                                  `yaml:"disk_label"`
	Binding   *ServiceInfoDiskEncryptionClevisBinding `yaml:"binding"`
	ReEncrypt bool                                    `yaml:"reencrypt"`
}

type ServiceInfoDiskEncryptionClevisBinding

type ServiceInfoDiskEncryptionClevisBinding struct {
	Pin    string `yaml:"pin,omitempty"`
	Config string `yaml:"config,omitempty"`
}

type ServiceInfoFile

type ServiceInfoFile struct {
	Path        string `yaml:"path"`
	Permissions string `yaml:"permissions,omitempty"`
	SourcePath  string `yaml:"source_path"`
	ConfigMap   string `yaml:"-"`
}

type ServiceInfoInitialUser

type ServiceInfoInitialUser struct {
	Username string   `yaml:"username"`
	Password string   `yaml:"password"`
	SSHKeys  []string `yaml:"sshkeys"`
}

Jump to

Keyboard shortcuts

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