pub struct HardenedConfig {
pub enabled: bool,
pub storage_key_salt: String,
}Expand description
Non-TEE hardened configuration: derive storage-encryption and JWT signing keys from
the master seed, so neither secret lives in config.toml or on disk.
This PoC mirrors the key-derivation that vta-enclave performs inside the
Nitro enclave (see tee::kms_bootstrap), without requiring KMS or an
enclave. The seed must reside in a real secret-store backend — the
plaintext file fallback (PlaintextSeedStore) defeats the protection.
Enable in config.toml:
[hardened]
enabled = true
storage_key_salt = "my-unique-per-vta-salt"Enabling on an existing VTA is handled automatically. The first boot
after setting this flag converts the existing plaintext rows to the
encrypted format before anything reads them
(hardened_bootstrap::migrate_store_to_encrypted). The pass is idempotent
and crash-safe, so it costs one prefix scan per keyspace on later boots and
an interrupted run is finished by the next one.
It has to be automatic: the store’s decrypt path is deliberately fail-closed with no plaintext fallback, so a VTA that started reading an unconverted store would fail on every pre-existing row — including its own ACL entries. Take a backup first regardless; the conversion rewrites every row in place.
Fields§
§enabled: boolWhen true, enables hardened non-TEE configuration:
- All 23 fjall keyspaces are encrypted with AES-256-GCM (
VAE1format, same as TEE mode). The storage-encryption key is derived from the master seed via HKDF. - The JWT signing key is generated randomly on first boot, AES-GCM
sealed under the storage key, and stored in the
bootstrapkeyspace. It is injected into memory only —[auth] jwt_signing_keyinconfig.tomlis absent and ignored.
Default false (standard non-TEE behaviour — plaintext fjall, JWT key
in config.toml).
storage_key_salt: StringSalt for the HKDF storage-key derivation.
Changing this invalidates all encrypted data. Set it once at
initial setup and treat it as permanent. Ignored when
enabled = false.
Trait Implementations§
Source§impl Clone for HardenedConfig
impl Clone for HardenedConfig
Source§fn clone(&self) -> HardenedConfig
fn clone(&self) -> HardenedConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HardenedConfig
impl Debug for HardenedConfig
Source§impl Default for HardenedConfig
impl Default for HardenedConfig
Source§impl<'de> Deserialize<'de> for HardenedConfig
impl<'de> Deserialize<'de> for HardenedConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for HardenedConfig
impl RefUnwindSafe for HardenedConfig
impl Send for HardenedConfig
impl Sync for HardenedConfig
impl Unpin for HardenedConfig
impl UnsafeUnpin for HardenedConfig
impl UnwindSafe for HardenedConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
impl<T, U> DeserializeTypedOwned<T> for Uwhere
U: for<'de> DeserializeTyped<'de, T>,
Source§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
Source§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.