credentialcrypto

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package credentialcrypto encrypts execution-service credentials at rest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	TenantID     string `json:"tenant_id"`
	VaultID      string `json:"vault_id"`
	CredentialID string `json:"credential_id"`
	AuthType     string `json:"auth_type"`
	Destination  string `json:"destination"`
}

Binding authenticates the credential's owner, identity, purpose and destination.

type Cipher

type Cipher struct {
	// contains filtered or unexported fields
}

func New

func New(key []byte) (*Cipher, error)

New requires a 32-byte AES key. The operator must limit each key to at most 2^32 encryptions, as required by the standard library's random-nonce GCM.

func (*Cipher) Fingerprint

func (c *Cipher) Fingerprint(purpose, secret string) (string, error)

Fingerprint returns a keyed digest of secret for its purpose. It lets stored idempotency hashes tell secrets apart without hashing a secret directly, so a stored hash cannot be used to test guesses offline without this key.

func (*Cipher) Open

func (c *Cipher) Open(ciphertext []byte, b Binding) ([]byte, error)

Open returns plaintext only after the ciphertext and complete binding authenticate.

func (*Cipher) OpenAgentModelExecution

func (c *Cipher) OpenAgentModelExecution(ciphertext []byte, tenantID, agentID string) ([]byte, error)

func (*Cipher) OpenDeploymentModelProvider

func (c *Cipher) OpenDeploymentModelProvider(ciphertext []byte, harness string) ([]byte, error)

func (*Cipher) OpenEnvironmentFile

func (c *Cipher) OpenEnvironmentFile(ciphertext []byte, binding EnvironmentFileBinding) ([]byte, error)

func (*Cipher) OpenEnvironmentSetup

func (c *Cipher) OpenEnvironmentSetup(ciphertext []byte, binding EnvironmentSetupBinding) ([]byte, error)

func (*Cipher) OpenModelExecution

func (c *Cipher) OpenModelExecution(ciphertext []byte, tenantID, sessionID string) ([]byte, error)

func (*Cipher) OpenSandboxDeployment

func (c *Cipher) OpenSandboxDeployment(ciphertext []byte, installation string, generation uint64) ([]byte, error)

func (*Cipher) OpenSkill

func (c *Cipher) OpenSkill(body []byte, binding SkillBinding) ([]byte, error)

func (*Cipher) OpenWorkspaceConfiguration added in v0.0.10

func (c *Cipher) OpenWorkspaceConfiguration(ciphertext []byte, installation, configuration string) ([]byte, error)

func (*Cipher) Seal

func (c *Cipher) Seal(plaintext []byte, b Binding) ([]byte, error)

Seal returns version || nonce || ciphertext || tag. The AEAD generates and prefixes its own nonce; the caller supplies no nonce or mutable output buffer.

func (*Cipher) SealAgentModelExecution

func (c *Cipher) SealAgentModelExecution(plaintext []byte, tenantID, agentID string) ([]byte, error)

func (*Cipher) SealDeploymentModelProvider

func (c *Cipher) SealDeploymentModelProvider(plaintext []byte, harness string) ([]byte, error)

func (*Cipher) SealEnvironmentFile

func (c *Cipher) SealEnvironmentFile(plaintext []byte, binding EnvironmentFileBinding) ([]byte, error)

func (*Cipher) SealEnvironmentSetup

func (c *Cipher) SealEnvironmentSetup(plaintext []byte, binding EnvironmentSetupBinding) ([]byte, error)

func (*Cipher) SealModelExecution

func (c *Cipher) SealModelExecution(plaintext []byte, tenantID, sessionID string) ([]byte, error)

func (*Cipher) SealSandboxDeployment

func (c *Cipher) SealSandboxDeployment(plaintext []byte, installation string, generation uint64) ([]byte, error)

func (*Cipher) SealSkill

func (c *Cipher) SealSkill(body []byte, binding SkillBinding) ([]byte, error)

func (*Cipher) SealWorkspaceConfiguration added in v0.0.10

func (c *Cipher) SealWorkspaceConfiguration(plaintext []byte, installation, configuration string) ([]byte, error)

type EnvironmentFileBinding

type EnvironmentFileBinding struct {
	TenantID string `json:"tenant_id"`
	Resource string `json:"resource"`
	OwnerID  string `json:"owner_id"`
	FileID   string `json:"file_id"`
}

EnvironmentFileBinding keeps confidential bytes scoped to one resource and file.

type EnvironmentSetupBinding

type EnvironmentSetupBinding struct {
	TenantID string `json:"tenant_id"`
	Resource string `json:"resource"`
	OwnerID  string `json:"owner_id"`
	Field    string `json:"field"`
}

EnvironmentSetupBinding separates confidential fields and immutable snapshots.

type SkillBinding

type SkillBinding struct {
	TenantID  string `json:"tenant_id"`
	SkillID   string `json:"skill_id"`
	VersionID string `json:"version_id"`
	Version   string `json:"version"`
}

SkillBinding prevents encrypted bundles from being moved across owners or versions.

func NewSkillBinding

func NewSkillBinding(tenant, skill, versionID uuid.UUID, version int64) SkillBinding

NewSkillBinding binds a version's archive to its tenant, Skill, version ID and version number.

Jump to

Keyboard shortcuts

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