Files
tessera/crates/tessera-core/src/config.rs
Adnan Zahir 95778d54e4 fix: harden the vault before release
Require a private passphrase and loopback-or-token admin auth. New vaults use Argon2id; existing PBKDF2 vaults still open, and new snapshot metadata is encrypted. Wormhole tokens survive restart, offset uploads seal into the vault, and client-certificate uploads are real. Reject the command provider and keep Postgres passwords off the process arguments. Keep the interruptible canvas motion.
2026-11-10 09:53:06 +07:00

46 lines
1.0 KiB
Rust

use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VaultConfig {
pub vault_id: Uuid,
pub vault_path: String,
pub created_at: chrono::DateTime<chrono::Utc>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HubConfig {
pub listen: String,
pub data_dir: String,
pub admin_password_hash: Option<String>,
}
impl Default for HubConfig {
fn default() -> Self {
Self {
listen: "127.0.0.1:8787".into(),
data_dir: "./data".into(),
admin_password_hash: None,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ProviderKind {
Filesystem,
Postgres,
Command,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OrbitSpec {
pub id: Uuid,
pub name: String,
pub provider: ProviderKind,
pub provider_config: serde_json::Value,
pub schedule: Option<String>,
pub decay_preset: String,
pub dry_run: bool,
}