common

package
v0.2403.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package common implements common SGX functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttestationWorker

func AttestationWorker(
	interval time.Duration,
	logger *logging.Logger,
	hp *sandbox.HostInitializerParams,
	updateCapabilityFunc func(context.Context, *sandbox.HostInitializerParams) (*node.CapabilityTEE, error),
)

AttestationWorker is the periodic re-attestation worker loop.

It should be started in its own goroutine.

func EndorseCapabilityTEE

func EndorseCapabilityTEE(
	ctx context.Context,
	identity *identity.Identity,
	capabilityTEE *node.CapabilityTEE,
	conn protocol.Connection,
	logger *logging.Logger,
)

EndorseCapabilityTEE endorses the given CapabilityTEE and submits the signed endorsement to the runtime over the given connection.

func GetQuotePolicy

func GetQuotePolicy(
	ctx context.Context,
	rtCfg *host.Config,
	cb consensus.Backend,
	fallbackPolicy *sgxQuote.Policy,
) (*sgxQuote.Policy, error)

GetQuotePolicy fetches the quote policy for the given manifest/component. In case the policy is not available, return the fallback policy.

func InitMetrics

func InitMetrics()

InitMetrics registers the metrics collectors if metrics are enabled.

func UpdateAttestationMetrics

func UpdateAttestationMetrics(runtimeID common.Namespace, kind component.TEEKind, err error)

UpdateAttestationMetrics updates the attestation metrics if metrics are enabled.

func UpdateRuntimeQuote

func UpdateRuntimeQuote(ctx context.Context, conn protocol.Connection, quote *pcs.QuoteBundle) ([]byte, error)

UpdateRuntimeQuote sends the given quote bundle to the runtime so it can be configured for remote attestation purposes. The runtime responds with a signed attestation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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