feat(auth): add seal-key-derived pubkey integrity tags with auth enforcement and unseal backfill #43
Reference in New Issue
Block a user
Delete Branch "Client-key-replacement-attack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #40
ed25519 signing and generalization plz
@@ -49,6 +49,7 @@ pem = "3.0.6"k256.workspace = truersa.workspace = truesha2.workspace = truehmac = "0.12"not sure we should bring hmac.
maybe better approach would be to derive ed25519 key from root key and sign with that.
@@ -170,2 +173,4 @@}/// Derives a dedicated key used only for user-agent pubkey integrity tags.pub fn derive_useragent_integrity_key(seal_key: &mut KeyCell) -> KeyCell {I would generalize this piece of code for all data that might require signing by seal key.
there is no point in specializing it for useragent pubkey only, and in future (very near future) we might need to sign every piece of data.
For example, program client, grants, etc -- all should be signed, because in practice this attack applies to each database table
@@ -257,6 +262,28 @@ impl KeyHolder {}// Decrypts the `aead_encrypted` entry with the given ID and returns the plaintextcomment drifted
@@ -223,0 +314,4 @@return Err(Error::UnregisteredPublicKey);};let Some(expected_tag) = self.try_sign_pubkey_integrity_tag(pubkey).await? else {this is a very dangeours code.
Better solution long term would be to return
AttestationStatusenum instead of().I image those variants:
@@ -88,2 +86,4 @@}}async fn backfill_missing_useragent_pubkey_integrity_tags(&mut self) -> Result<(), Error> {nice thinking, but this is not needed because we are pre-deploy. So it's fine to make breaking changes
this is probably llm output thoYour both guesses are right. That was my order to LLM to implement this :3
And... should I remove this or what?
yes
@Skipper, is it assigned?