Skip to main content

Crate tensor_vault

Crate tensor_vault 

Source
Expand description

Tensor Vault: Secure secret storage with graph-based access control.

Secrets are encrypted at rest using AES-256-GCM. Access is controlled by graph topology - a requester must have a path to the secret node.

Security features:

  • AES-256-GCM authenticated encryption
  • Argon2id key derivation (GPU/ASIC resistant)
  • Key obfuscation via HMAC (hides secret names in storage)
  • Metadata encryption (hides creator, timestamps)
  • Length padding (hides plaintext size)
  • Pointer indirection (hides storage patterns)
  • Graph-based access control (topological authorization)

Modules§

namespaced
Namespaced vault view for multi-tenant isolation.
scoped
Scoped vault view for a specific entity.

Structs§

AccessController
Access controller using graph topology for authorization.
AccessCycle
A cycle detected in the access graph.
AccessExplanation
Full explanation of how an entity accesses (or fails to access) a secret.
AccessHop
A single hop in an access path explanation.
AccessTensor
3D access tensor: entities x secrets x time_buckets.
AccessTensorConfig
Configuration for building an access tensor.
AccessTopology
Access topology: a flat matrix encoding entity-secret permission relationships.
AgentProfile
Per-agent behavioral state tracked by the monitor.
AnomalyMonitor
Thread-safe anomaly monitor that tracks per-agent behavior.
AnomalyThresholds
Configurable thresholds for anomaly detection.
ApiKeyConfig
Configuration for API key generation.
AttenuationPolicy
Policy controlling how permissions attenuate with graph distance.
AuditContext
Optional context for audit entries (IP, session, correlation ID).
AuditEntry
Audit entry representing a single vault operation.
AuditLog
Audit log for tracking vault operations.
BatchPermissionResult
Result of a batch permission check.
BatchSetResult
Per-entry outcome from a batch set operation.
BehaviorEmbeddingConfig
Configuration for behavior embedding computation.
BlastRadius
All secrets reachable by an entity.
CertInfo
Information about an issued certificate.
CertificateRequest
Certificate signing request parameters.
ChangelogEntry
A single entry in a secret’s change history.
Cipher
Encryption cipher using AES-256-GCM with HKDF-derived key.
ClusteringResult
Result of clustering entities by their access graph structure.
CriticalEntity
An entity identified as critical infrastructure.
DelegationAnomalyScore
Anomaly score for a specific access grant.
DelegationManager
Manages delegation relationships between agents.
DelegationRecord
A recorded delegation from parent to child agent.
DependencyInfo
Information about a single dependency edge.
DriftDetection
Drift detection result for a single entity.
DynamicSecretMetadata
Metadata for a generated dynamic secret.
EngineRegistry
Registry of secret engines.
EntityAccessProfile
Per-entity access behavior profile.
EntityRiskScore
Per-entity risk score.
EntityTrustScore
Per-entity trust score based on triangle participation.
EnvSyncTarget
Environment variable sync target: sets env vars (in-process only).
ExcludedTarget
A target excluded from sync with the reason.
ExponentialAttenuationPolicy
Smooth exponential decay attenuation policy.
FileSyncTarget
File-based sync target: writes secrets to files.
GeoCoordinate
A point in 2D or 3D coordinate space representing a geographic location.
GeoRouter
Thread-safe geometric router for sync targets.
GeometricAnomalyReport
Report of geometric anomaly detection across all entities.
GeometricAnomalyResult
Anomaly result for a single entity.
GrantTTLTracker
Tracks grant expiration times for automatic revocation.
HeatKernelConfig
Configuration for heat kernel trust diffusion.
HeatKernelTrustReport
Report from heat kernel trust analysis.
HeatKernelTrustScore
Per-entity trust score after heat kernel diffusion.
ImpactReport
Report of secrets and agents affected by a change to a root secret.
InferredRole
An inferred role based on community detection.
KeyShare
A single key share from Shamir splitting.
MasterKey
Derived master key for encryption (zeroized on drop).
NewAccess
A new access created by a simulated grant.
NodeEmbedding
Per-entity embedding vector derived from topology and access patterns.
Obfuscator
Obfuscation utilities using HMAC-like construction.
OverPrivilegedEntity
An entity with disproportionately high access.
PagedSecrets
Paginated list of secret keys.
PasswordConfig
Configuration for password generation.
PendingRotation
A rotation that is due or overdue.
PkiEngine
PKI engine implementing the SecretEngine trait.
PlacementConfig
Tuning weights that control placement scoring.
PlacementRecommendation
Recommended placement for a single secret across available regions.
PolicyManager
Thread-safe policy manager backed by persistent storage.
PolicyMatch
Result of evaluating policies for an entity.
PolicyRedundancyReport
Report on policy redundancy and merge opportunities.
PolicyTemplate
A policy template that grants access based on entity/secret patterns.
PrivilegeAnalysis
Individual entity privilege analysis.
PrivilegeAnalysisReport
Full privilege analysis report.
QuotaManager
Thread-safe quota manager backed by persistent storage.
RateLimitConfig
Configuration for rate limiting.
RateLimiter
Rate limiter using sliding window algorithm.
ReachableSecret
A single secret reachable by an entity.
RegionRegistry
Thread-safe registry of deployment regions and entity geographic locations.
ResourceQuota
Resource limits for a namespace.
ResourceUsage
Current resource usage for a namespace.
RevocationEntry
A single revocation entry in the CRL.
RevocationList
Certificate revocation list signed by the CA.
RiskContributor
Contributor to an entity’s risk.
RiskPropagationReport
Full risk propagation report.
RoleInferenceResult
Result of role inference.
RotationPlan
Prioritized rotation plan for cascading secret changes.
RotationPolicy
A declarative rotation policy for a secret.
RotationStep
A step in a prioritized rotation plan.
RoutedTarget
A target selected for sync with its composite score.
RoutingConfig
Tuning knobs for geometric routing decisions.
RoutingDecision
Routing outcome for a single secret sync operation.
SealState
Seal state shared across the vault.
SeasonalPattern
A seasonal pattern extracted via TT decomposition.
SecretAccessProfile
Per-secret access pattern profile.
SecretFeatures
Operational metadata features for a secret.
SecretSummary
Summary metadata for a secret.
SecurityAuditReport
Full security audit report.
ShamirConfig
Configuration for Shamir secret sharing.
SimilarSecret
A similar secret found by the similarity index.
SimilarityIndex
HNSW-backed similarity index for secret metadata embeddings.
SimulationResult
Result of a simulated grant.
SinglePointOfFailure
An entity whose removal would disconnect parts of the graph.
SpectralCluster
A cluster of entities with similar access patterns.
StoredTemplate
A persisted secret template.
SyncManager
Thread-safe sync manager.
TargetGeometry
Health and location metadata for a sync target.
TemplateManager
Thread-safe manager for secret generation templates.
TemporalAnalysisConfig
Configuration for temporal pattern analysis.
TemporalAnalysisReport
Combined temporal analysis report.
TokenConfig
Configuration for token generation.
TopologyConfig
Configuration for access topology extraction.
TrustTransitivityReport
Full trust transitivity report.
Vault
Secure secret storage with graph-based access control.
VaultConfig
Configuration for the vault.
VaultRegion
A vault deployment region with capacity and inter-region latency metadata.
VaultSnapshot
Metadata about a vault snapshot.
VaultStatus
Comprehensive vault health and status information.
VersionDiff
Side-by-side comparison of two secret versions.
VersionInfo
Information about a secret version.
WeightedAffectedSecret
A downstream secret with weight and impact score.
WeightedImpactReport
Weighted impact analysis report.
WrappingToken
Metadata about a wrapping token.

Enums§

AnomalyEvent
An anomalous event detected by the monitor.
AuditOperation
Types of auditable operations.
DenialReason
Why access was denied.
DependencyWeight
Weight classification for dependency edges.
ExclusionReason
Why a target was excluded from the routing decision.
Operation
Operation types that can be rate limited.
PaddingSize
Padding block sizes for length hiding.
PasswordCharset
Character sets for password generation.
Permission
Permission levels for vault access.
RotationGenerator
How to generate a new secret value on rotation.
SecretTemplate
Template for generating dynamic secrets.
TokenEncoding
Encoding format for tokens.
VaultError
Error types for vault operations.
VaultEvent
Events emitted by vault operations for monitoring and alerting.

Constants§

KEY_SIZE
AES-256 key size in bytes.
NONCE_SIZE
12-byte nonce for AES-GCM (96 bits is the standard).
SALT_SIZE
Salt size for Argon2id key derivation.

Traits§

SecretEngine
Trait for pluggable secret engines.
SyncTarget
Trait for external sync targets.
VaultEventHandler
Trait for handling vault events.

Functions§

batch_recommend_placement
Recommend placement for every secret the vault root can list.
recommend_placement
Recommend the best region placement for a single secret.
reconstruct_master_key
Reconstruct a master key from shares using Lagrange interpolation over GF(256).
split_master_key
Split a master key into shares using Shamir secret sharing over GF(256).

Type Aliases§

Result
A specialized Result type for vault operations.