clients

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package clients contains the domain concept definitions needed to support client configuration for HTTP/gRPC connections.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAttestationRequestContext = errors.New("invalid attestation request context")
)

Functions

This section is empty.

Types

type AttestedClientConfig

type AttestedClientConfig struct {
	StandardClientConfig
	AttestationPolicy string `env:"ATTESTATION_POLICY" envDefault:""`
	AttestedTLS       bool   `env:"ATTESTED_TLS"       envDefault:"false"`
	ProductName       string `env:"PRODUCT_NAME"       envDefault:"Milan"`
	// AttestationRequestContextHex, when set, is decoded from hex and used as
	// the exported authenticator certificate_request_context. This lets the
	// caller provide the background-check freshness value directly.
	AttestationRequestContextHex string `env:"ATTESTATION_REQUEST_CONTEXT" envDefault:""`
	// AttestationRequestContext allows callers inside the same process to pass
	// raw request-context bytes directly instead of using the hex string form.
	AttestationRequestContext []byte `env:"-"`
}

AttestedClientConfig represents a client configuration with attested TLS capabilities.

func (AttestedClientConfig) Config

func (AttestedClientConfig) RequestContext added in v0.9.0

func (c AttestedClientConfig) RequestContext() ([]byte, error)

type ClientConfiguration

type ClientConfiguration interface {
	Config() StandardClientConfig
}

type StandardClientConfig

type StandardClientConfig struct {
	URL          string        `env:"URL"             envDefault:"localhost:7001"`
	Timeout      time.Duration `env:"TIMEOUT"         envDefault:"60s"`
	ClientCert   string        `env:"CLIENT_CERT"     envDefault:""`
	ClientKey    string        `env:"CLIENT_KEY"      envDefault:""`
	ServerCAFile string        `env:"SERVER_CA_CERTS" envDefault:""`
}

StandardClientConfig represents a basic client configuration without attested TLS.

func (StandardClientConfig) Config

Directories

Path Synopsis
Package grpc contains the domain concept definitions needed to support Agent Client grpc functionality.
Package grpc contains the domain concept definitions needed to support Agent Client grpc functionality.
cvm
log

Jump to

Keyboard shortcuts

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