Repository navigation
feat(TC-887): at_rest data key types and DataKeyProvider trait - #320
Merged
Merged
Conversation
Adds tinycloud_core::at_rest with DekId, DataKey and ObjectNameKey (zeroized on drop, redacted Debug), the DataKeyProvider trait with DataKeyError, and a deterministic FixedKeyProvider for tests. Nothing in the node uses the module yet.
Contributor
Author
|
REQUEST_CHANGES: see TC-887 (reviewed head db56854) |
FixedKeyProvider moves to at_rest/testing.rs, compiled only for this crate's tests or with the new test-util feature. Its Debug no longer prints the seed. Refresh test/m1-realdata-e2e/Cargo.lock for zeroize.
Contributor
Author
|
APPROVE: see TC-887 (reviewed head bc618de) |
1 similar comment
Contributor
Author
|
APPROVE: see TC-887 (reviewed head bc618de) |
This was referenced Oct 17, 2026
samgbafa
added a commit
that referenced
this pull request
Oct 17, 2026
…kfiles in CI (#332) * fix(TC-887): refresh the w5 lockfile and check separate workspace lockfiles in CI test/w5-policy-runtime-node-e2e/Cargo.lock lacked tinycloud-core's new aes, hkdf and zeroize dependencies and the aes/aes-gcm zeroize features (#320, #322), so cargo --locked failed there. Regenerated minimally. CI built only the main workspace and m1-realdata-e2e. A new lockfiles job resolves every fetchable workspace with --locked and runs scripts/ci/check-separate-lockfiles.py, which checks the w5 lockfile (its private git dependency is not fetchable in CI) for in-repo crates' direct dependencies and requested dependency features. * ci(TC-887): drop the hand-rolled w5 lockfile checker Keep the w5 lockfile fix and the --locked resolves of main, m1 and test/load/signer. w5 coverage follows separately with real cargo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of TC-887 (encryption at rest). First of several small PRs; this one adds types only.
What changed
tinycloud_core::at_rest(tinycloud-core/src/at_rest/):DekId,DataKey(DEK bytes + id) andObjectNameKey. Key bytes are zeroized on drop and never printed byDebug; there is no public byte accessor.DataKeyProvidertrait (current_key,key,object_name_key) andDataKeyError(Locked,UnknownKey,Backend).FixedKeyProvider(at_rest/testing.rs): deterministic in-memory provider for tests (keys derived from a public seed; can be built locked). Compiled only for tinycloud-core's own tests or with the newtest-utilfeature (for downstream dev-dependencies); itsDebugdoesn't print the seed.tinycloud-coregains a directzeroize = "1"dependency (already inCargo.locktransitively) and atest-utilfeature.test/m1-realdata-e2e/Cargo.lockrefreshed.The interface is agreed between the envelope and key-continuity work; the key-continuity branch stacks on this one.
How it's tested
cargo test -p tinycloud-core --lib at_rest: 3 testsDebugofDataKey/ObjectNameKey/FixedKeyProviderdoes not contain the key or seed bytes;FixedKeyProviderserves ids1..=currentper space, distinct per space and id, and returnsUnknownKeyfor 0 and ids above current;Lockedfrom all three methods.cargo clippy -p tinycloud-core --all-targets -- -D warnings,cargo clippy -p tinycloud-core --features test-util -- -D warningsandcargo fmt --check: clean.cargo metadata --lockedfor the workspace andtest/m1-realdata-e2e: pass.Merge order: after the current main release is cut (TC-887 plan §7).