-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-14252] Switch to oo7 and drop libsecret #11900
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11900 +/- ##
=======================================
Coverage 33.41% 33.42%
=======================================
Files 2841 2841
Lines 89008 89008
Branches 16979 16979
=======================================
+ Hits 29744 29751 +7
+ Misses 56927 56920 -7
Partials 2337 2337 ☔ View full report in Codecov by Sentry. |
New Issues
Fixed Issues
|
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.
Nice, looks pretty good to me!
@@ -28,14 +28,16 @@ pub trait BiometricTrait { | |||
#[allow(async_fn_in_trait)] | |||
async fn available() -> Result<bool>; | |||
fn derive_key_material(secret: Option<&str>) -> Result<OsDerivedKey>; | |||
fn set_biometric_secret( | |||
#[allow(async_fn_in_trait)] |
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.
Can we lift the #[allow()]
to the trait to avoid repeating it multiple times?
@@ -84,7 +82,7 @@ security-framework = { version = "=3.0.0", optional = true } | |||
security-framework-sys = { version = "=2.12.0", optional = true } | |||
|
|||
[target.'cfg(target_os = "linux")'.dependencies] | |||
gio = { version = "=0.19.5", optional = true } | |||
libsecret = { version = "=0.5.0", optional = true } |
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.
If we're removing the libsecret
crate can we also remove the dependency to the libsecret
system package?
clients/apps/desktop/electron-builder.json
Line 232 in 21f7fff
"depends": ["libnotify4", "libxtst6", "libnss3", "libsecret-1-0", "libxss1"] |
clients/.github/workflows/build-desktop.yml
Line 165 in 21f7fff
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm musl-dev musl-tools |
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm |
} | ||
} | ||
|
||
pub fn get_password_keytar(service: &str, account: &str) -> Result<String> { | ||
get_password(service, account) | ||
// forces to read via secret service; remvove after 2024.03 |
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.
Do you mean remove after 2025.03?
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.
When building this I'm getting some Cargo dep conflicts that require me to downgrade zbus to 4.2.0, do you see that issue as well?
Other than that, I've tested this and it works perfect, great work!
@@ -84,7 +82,7 @@ security-framework = { version = "=3.0.0", optional = true } | |||
security-framework-sys = { version = "=2.12.0", optional = true } | |||
|
|||
[target.'cfg(target_os = "linux")'.dependencies] | |||
gio = { version = "=0.19.5", optional = true } | |||
libsecret = { version = "=0.5.0", optional = true } | |||
oo7 = "0.3.3" |
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 should pin the dep like the rest of them
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-14252
📔 Objective
Oo7 (https://github.com/bilelmoussaoui/oo7) is the library for interacting with desktop Linux keyrings that many modern projects are switching towards. It supports accessing secret service directly, but also going via the secret portal in sandboxes (for flatpak/snap).
Note: Migration code is included. If there are clients that are on snap / flatpak, they will migrate from storing directly in secret service to the file backend + portal based approach.
The API is a lot more sane and the library is pure rust, which should reduce bugs we have with linux platform secrets management. Also drops dependency on compiling against c libraries.
(Also should make cross compiling for ARM possible)
📸 Screenshots
⏰ Reminders before review
🦮 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 confirmed issue 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