egressattribution

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package egressattribution frames Runner-established execution identity before guest bytes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteExecutionAttribution

func WriteExecutionAttribution(writer io.Writer, attribution ExecutionAttribution) error

WriteExecutionAttribution must finish before the Runner forwards any guest bytes. The caller owns the connection's write deadline and closes it on failure.

Types

type ExecutionAttribution

type ExecutionAttribution struct {
	TenantRef        string    `json:"tenantRef"`
	SubjectRef       string    `json:"subjectRef"`
	SandboxID        string    `json:"sandboxId"`
	InstanceID       string    `json:"instanceId"`
	AssignmentID     string    `json:"assignmentId"`
	Generation       int64     `json:"generation"`
	AuthorizationRef string    `json:"authorizationRef"`
	ExpiresAt        time.Time `json:"expiresAt"`
}

ExecutionAttribution belongs to one accepted connection for its entire lifetime. It contains correlation evidence, never credentials or the raw assignment fence.

func ReadExecutionAttribution

func ReadExecutionAttribution(reader io.Reader, now time.Time) (ExecutionAttribution, error)

ReadExecutionAttribution is for an authenticated Runner Unix peer, never a guest TCP peer. The caller supplies a read deadline; bytes following the preface remain unread.

func ReadRunnerExecutionAttribution

func ReadRunnerExecutionAttribution(connection *net.UnixConn, runnerUID uint32, deadline time.Time) (ExecutionAttribution, error)

ReadRunnerExecutionAttribution authenticates the configured host peer before reading its preface. The caller must close on failure and retain ExpiresAt as the connection's maximum lifetime.

Jump to

Keyboard shortcuts

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