-
Notifications
You must be signed in to change notification settings - Fork 17
[PM-23653] Add support for ssh keys #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## cxf/sample #375 +/- ##
==============================================
+ Coverage 75.63% 75.71% +0.08%
==============================================
Files 256 257 +1
Lines 23120 23214 +94
==============================================
+ Hits 17486 17577 +91
- Misses 5634 5637 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the removal of expect
this looks good to me. One note, but it's not actionable here.
…xf/ssh # Conflicts: # crates/bitwarden-exporters/src/cxf/import.rs # crates/bitwarden-exporters/src/cxf/mod.rs
|
Ok((ssh_key, fields)) => add_item(CipherType::SshKey(Box::new(ssh_key)), fields), | ||
Err(_) => { | ||
// Include information about the failed items, or import as note? | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we need to figure out a strategy to handle errors in a more structured, actionable way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to change the approach in this PR, but I do think we should opt for the "don't loose any data" approach and save it to a note, if we can encode the value in a meaningful way.
pub fn import_pkcs8_der(encoded_key: &[u8]) -> Result<SshKeyView, SshKeyImportError> { | ||
import_der_key(encoded_key) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should these import_pkcs8_der
and import_der_key
live in ssh.rs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we support importing keys outside cxf so we can't move it into the exporters crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just smaller notes. Is there any update we can/should do to the cxf_sample tests?
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-23653
📔 Objective
Adds support for importing ssh keys using CXF.
⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes