Secret Service
Secret Service Rust library.
Interfaces with the Linux Secret Service API through dbus.
Documentation
Basic Usage
secret-service is implemented in pure Rust by default, so it doesn't require any system libraries
such as libdbus-1-dev or libdbus-1-3 on Ubuntu.
In Cargo.toml:
When adding the crate, you must select a feature representing your selected runtime and cryptography backend. For example:
[]
= { = "3.0.0", = ["rt-tokio-crypto-rust"] }
Available feature flags:
rt-async-io-crypto-rust: Uses theasync-stdruntime and pure Rust crytography viaRustCrypto.rt-async-io-crypto-openssl: Uses theasync-stdruntime and OpenSSL as the cryptography provider.rt-tokio-crypto-rust: Uses thetokioruntime and pure Rust cryptography viaRustCrypto.rt-tokio-crypto-openssl: Uses thetokioruntime and OpenSSL as the cryptography provider.
Note that the -openssl feature sets require OpenSSL to be available on your system, or the bundled feature
of openssl crate must be activated in your cargo dependency tree instead.
In source code (below example is for --bin, not --lib). This example uses tokio as
the async runtime.
use SecretService;
use EncryptionType;
use ;
async
Functionality
- SecretService: initialize dbus, create plain/encrypted session.
- Collections: create, delete, search.
- Items: create, delete, search, get/set secret.
Changelog
Versioning
This library is feature complete, has stabilized its API for the most part. However, as this
crate is almost soley reliable on the zbus crate, we try and match major version releases
with theirs to handle breaking changes and move with the wider zbus ecosystem.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.