refactor(dgw): simplify aead error mapping in credential crypto#1693
Closed
refactor(dgw): simplify aead error mapping in credential crypto#1693
Conversation
Add ChaCha20-Poly1305 encryption for credentials stored in the credential store. Passwords are encrypted at rest with a master key protected via libsodium's mlock/mprotect facilities, preventing exposure in memory dumps or swap. Issue: DGW-326
Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on using anyhow::Context for error handling
refactor(dgw): simplify aead error mapping in credential crypto
Feb 26, 2026
bada7f5 to
d8fc305
Compare
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.
aead::Erroris a unit struct that does not implementstd::error::Error, making.context()inapplicable. Simplifies the two AEAD error sites to drop the unused binding since the type carries no diagnostic information.Changes:
encrypt/decrypt:map_err(|e| anyhow::anyhow!("...: {e}"))→map_err(|_| anyhow::anyhow!("...")).context()is already used where applicable (e.g.,String::from_utf8on the decrypted bytes)Issue: #1689
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.