Documentation
¶
Overview ¶
Package credentialcrypto encrypts execution-service credentials at rest.
Index ¶
- type Binding
- type Cipher
- func (c *Cipher) Fingerprint(purpose, secret string) (string, error)
- func (c *Cipher) Open(ciphertext []byte, b Binding) ([]byte, error)
- func (c *Cipher) OpenAgentModelExecution(ciphertext []byte, tenantID, agentID string) ([]byte, error)
- func (c *Cipher) OpenAutomationTarget(ciphertext []byte, tenantID, automationID string) ([]byte, error)
- func (c *Cipher) OpenDeploymentModelProvider(ciphertext []byte, harness string) ([]byte, error)
- func (c *Cipher) OpenEnvironmentFile(ciphertext []byte, binding EnvironmentFileBinding) ([]byte, error)
- func (c *Cipher) OpenEnvironmentSetup(ciphertext []byte, binding EnvironmentSetupBinding) ([]byte, error)
- func (c *Cipher) OpenModelExecution(ciphertext []byte, tenantID, sessionID string) ([]byte, error)
- func (c *Cipher) OpenSandboxDeployment(ciphertext []byte, installation string, generation uint64) ([]byte, error)
- func (c *Cipher) OpenSkill(body []byte, binding SkillBinding) ([]byte, error)
- func (c *Cipher) OpenWorkspaceConfiguration(ciphertext []byte, installation, configuration string) ([]byte, error)
- func (c *Cipher) Seal(plaintext []byte, b Binding) ([]byte, error)
- func (c *Cipher) SealAgentModelExecution(plaintext []byte, tenantID, agentID string) ([]byte, error)
- func (c *Cipher) SealAutomationTarget(plaintext []byte, tenantID, automationID string) ([]byte, error)
- func (c *Cipher) SealDeploymentModelProvider(plaintext []byte, harness string) ([]byte, error)
- func (c *Cipher) SealEnvironmentFile(plaintext []byte, binding EnvironmentFileBinding) ([]byte, error)
- func (c *Cipher) SealEnvironmentSetup(plaintext []byte, binding EnvironmentSetupBinding) ([]byte, error)
- func (c *Cipher) SealModelExecution(plaintext []byte, tenantID, sessionID string) ([]byte, error)
- func (c *Cipher) SealSandboxDeployment(plaintext []byte, installation string, generation uint64) ([]byte, error)
- func (c *Cipher) SealSkill(body []byte, binding SkillBinding) ([]byte, error)
- func (c *Cipher) SealWorkspaceConfiguration(plaintext []byte, installation, configuration string) ([]byte, error)
- type EnvironmentFileBinding
- type EnvironmentSetupBinding
- type SkillBinding
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 ¶
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 ¶
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 ¶
Open returns plaintext only after the ciphertext and complete binding authenticate.
func (*Cipher) OpenAgentModelExecution ¶
func (*Cipher) OpenAutomationTarget ¶ added in v0.0.14
func (*Cipher) OpenDeploymentModelProvider ¶
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 (*Cipher) OpenSandboxDeployment ¶
func (*Cipher) OpenSkill ¶
func (c *Cipher) OpenSkill(body []byte, binding SkillBinding) ([]byte, error)
func (*Cipher) OpenWorkspaceConfiguration ¶ added in v0.0.10
func (*Cipher) Seal ¶
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 (*Cipher) SealAutomationTarget ¶ added in v0.0.14
func (c *Cipher) SealAutomationTarget(plaintext []byte, tenantID, automationID string) ([]byte, error)
SealAutomationTarget seals the confidential Session request of an Automation target, bound to its tenant and Automation.
func (*Cipher) SealDeploymentModelProvider ¶
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 (*Cipher) SealSandboxDeployment ¶
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.