Add Linux keyring storage boundary
This commit is contained in:
@@ -18,3 +18,8 @@ jobs:
|
|||||||
- run: npm run format:check
|
- run: npm run format:check
|
||||||
- run: npm run check
|
- run: npm run check
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
- working-directory: native
|
||||||
|
run: cargo fmt -- --check
|
||||||
|
- working-directory: native
|
||||||
|
run: cargo test
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ This directory is the home of the standalone Linux client repository.
|
|||||||
|
|
||||||
The current development shell connects to the server readiness endpoint and
|
The current development shell connects to the server readiness endpoint and
|
||||||
provides an administrator login gate. The browser/dev client keeps its bearer
|
provides an administrator login gate. The browser/dev client keeps its bearer
|
||||||
session in memory only; the native AppImage integration must replace that
|
session in memory only. The `native/` crate defines the AppImage storage
|
||||||
temporary behavior with the Linux kernel keyring before persistent client
|
boundary: `settings.json` contains only the server address and username, while
|
||||||
authentication is considered complete.
|
the session credential is stored in the Linux kernel keyring with no plaintext
|
||||||
|
fallback.
|
||||||
|
|
||||||
The client is a Svelte-based control surface distributed as an x86-64 AppImage. It communicates with `trixie-server` through the documented versioned HTTP and authenticated WebSocket interfaces.
|
The client is a Svelte-based control surface distributed as an x86-64 AppImage. It communicates with `trixie-server` through the documented versioned HTTP and authenticated WebSocket interfaces.
|
||||||
|
|
||||||
|
|||||||
Generated
+284
@@ -0,0 +1,284 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 4
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "2.13.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "block-buffer"
|
||||||
|
version = "0.10.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg-if"
|
||||||
|
version = "1.0.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cpufeatures"
|
||||||
|
version = "0.2.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crypto-common"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
"typenum",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "digest"
|
||||||
|
version = "0.10.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||||
|
dependencies = [
|
||||||
|
"block-buffer",
|
||||||
|
"crypto-common",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "errno"
|
||||||
|
version = "0.3.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fastrand"
|
||||||
|
version = "2.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "generic-array"
|
||||||
|
version = "0.14.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||||
|
dependencies = [
|
||||||
|
"typenum",
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "getrandom"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"r-efi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "1.0.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.191"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "linux-raw-sys"
|
||||||
|
version = "0.12.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "once_cell"
|
||||||
|
version = "1.21.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.107"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "1.0.47"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "r-efi"
|
||||||
|
version = "6.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustix"
|
||||||
|
version = "1.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"errno",
|
||||||
|
"libc",
|
||||||
|
"linux-raw-sys",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.229"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_core"
|
||||||
|
version = "1.0.229"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
||||||
|
dependencies = [
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.229"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.154"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
||||||
|
dependencies = [
|
||||||
|
"itoa",
|
||||||
|
"memchr",
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
"zmij",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sha2"
|
||||||
|
version = "0.10.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"cpufeatures",
|
||||||
|
"digest",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "3.0.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tempfile"
|
||||||
|
version = "3.27.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
||||||
|
dependencies = [
|
||||||
|
"fastrand",
|
||||||
|
"getrandom",
|
||||||
|
"once_cell",
|
||||||
|
"rustix",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "trixy-native"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha2",
|
||||||
|
"tempfile",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typenum"
|
||||||
|
version = "1.20.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.27"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "version_check"
|
||||||
|
version = "0.9.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-link"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-sys"
|
||||||
|
version = "0.61.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||||
|
dependencies = [
|
||||||
|
"windows-link",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zmij"
|
||||||
|
version = "1.0.23"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "trixy-native"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
license = "MIT"
|
||||||
|
description = "Native Linux storage boundary for the Trixie client"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
sha2 = "0.10"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempfile = "3"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Native credential boundary
|
||||||
|
|
||||||
|
This crate is the storage boundary used by the future Linux AppImage shell.
|
||||||
|
`Settings` writes only `server_address` and `username` to the client
|
||||||
|
`settings.json`. Session credentials are stored under the Linux kernel
|
||||||
|
keyring service `trixie.server.session`, scoped by server address and
|
||||||
|
username. `load_session` returns `None` when the keyring is unavailable;
|
||||||
|
callers must return to credential entry and must not create a plaintext
|
||||||
|
fallback.
|
||||||
|
|
||||||
|
The crate uses `keyctl` with argument arrays, never a shell command. It does
|
||||||
|
not log or serialize session values.
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
//! Native persistence boundary for the Linux client.
|
||||||
|
//!
|
||||||
|
//! Settings are deliberately limited to non-secret connection metadata. The
|
||||||
|
//! session credential is stored as a `user` key in the Linux kernel keyring
|
||||||
|
//! through the `keyctl` utility. If keyring access fails, callers receive an
|
||||||
|
//! error and must ask for credentials again; no plaintext fallback is allowed.
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
use sha2::{Digest, Sha256};
|
||||||
|
use std::{
|
||||||
|
fs, io,
|
||||||
|
path::{Path, PathBuf},
|
||||||
|
process::Command,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const KEYRING_SERVICE: &str = "trixie.server.session";
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
|
pub struct Settings {
|
||||||
|
pub server_address: String,
|
||||||
|
pub username: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Settings {
|
||||||
|
pub fn load(path: impl AsRef<Path>) -> io::Result<Self> {
|
||||||
|
let bytes = fs::read(path)?;
|
||||||
|
serde_json::from_slice(&bytes)
|
||||||
|
.map_err(|error| io::Error::new(io::ErrorKind::InvalidData, error))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn save(&self, path: impl AsRef<Path>) -> io::Result<()> {
|
||||||
|
let path = path.as_ref();
|
||||||
|
if let Some(parent) = path.parent() {
|
||||||
|
fs::create_dir_all(parent)?;
|
||||||
|
}
|
||||||
|
let bytes = serde_json::to_vec_pretty(self)
|
||||||
|
.map_err(|error| io::Error::new(io::ErrorKind::InvalidData, error))?;
|
||||||
|
let temporary = path.with_extension("json.tmp");
|
||||||
|
fs::write(&temporary, bytes)?;
|
||||||
|
fs::rename(temporary, path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn default_settings_path() -> PathBuf {
|
||||||
|
let base = std::env::var_os("XDG_CONFIG_HOME")
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.or_else(|| std::env::var_os("HOME").map(|home| PathBuf::from(home).join(".config")))
|
||||||
|
.unwrap_or_else(|| PathBuf::from("."));
|
||||||
|
base.join("trixie").join("settings.json")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn key_description(settings: &Settings) -> String {
|
||||||
|
let mut digest = Sha256::new();
|
||||||
|
digest.update(settings.server_address.as_bytes());
|
||||||
|
digest.update([0]);
|
||||||
|
digest.update(settings.username.as_bytes());
|
||||||
|
let digest = digest.finalize();
|
||||||
|
format!("{KEYRING_SERVICE}:{}", hex_encode(&digest))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn hex_encode(bytes: &[u8]) -> String {
|
||||||
|
const HEX: &[u8; 16] = b"0123456789abcdef";
|
||||||
|
let mut result = String::with_capacity(bytes.len() * 2);
|
||||||
|
for byte in bytes {
|
||||||
|
result.push(HEX[(byte >> 4) as usize] as char);
|
||||||
|
result.push(HEX[(byte & 0x0f) as usize] as char);
|
||||||
|
}
|
||||||
|
result
|
||||||
|
}
|
||||||
|
|
||||||
|
fn keyctl(args: &[&str]) -> io::Result<Vec<u8>> {
|
||||||
|
let output = Command::new("keyctl").args(args).output()?;
|
||||||
|
if !output.status.success() {
|
||||||
|
return Err(io::Error::new(
|
||||||
|
io::ErrorKind::PermissionDenied,
|
||||||
|
"Linux kernel keyring access failed",
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Ok(output.stdout)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn store_session(settings: &Settings, session: &str) -> io::Result<()> {
|
||||||
|
if session.is_empty() {
|
||||||
|
return Err(io::Error::new(io::ErrorKind::InvalidInput, "empty session"));
|
||||||
|
}
|
||||||
|
let description = key_description(settings);
|
||||||
|
keyctl(&["add", "user", &description, session, "@s"]).map(|_| ())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn load_session(settings: &Settings) -> io::Result<Option<String>> {
|
||||||
|
let description = key_description(settings);
|
||||||
|
let id = match keyctl(&["search", "@s", "user", &description]) {
|
||||||
|
Ok(value) => String::from_utf8_lossy(&value).trim().to_string(),
|
||||||
|
Err(_) => return Ok(None),
|
||||||
|
};
|
||||||
|
if id.is_empty() {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
|
let value = keyctl(&["pipe", &id])?;
|
||||||
|
String::from_utf8(value)
|
||||||
|
.map(Some)
|
||||||
|
.map_err(|error| io::Error::new(io::ErrorKind::InvalidData, error))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clear_session(settings: &Settings) -> io::Result<()> {
|
||||||
|
let description = key_description(settings);
|
||||||
|
let id = String::from_utf8_lossy(&keyctl(&["search", "@s", "user", &description])?)
|
||||||
|
.trim()
|
||||||
|
.to_string();
|
||||||
|
if id.is_empty() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
keyctl(&["unlink", &id, "@s"]).map(|_| ())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
fn settings() -> Settings {
|
||||||
|
Settings {
|
||||||
|
server_address: "https://trixie.example".into(),
|
||||||
|
username: "admin".into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn settings_round_trip_contains_no_password_field() {
|
||||||
|
let directory = tempfile::tempdir().expect("temporary directory");
|
||||||
|
let path = directory.path().join("settings.json");
|
||||||
|
settings().save(&path).expect("save settings");
|
||||||
|
let text = fs::read_to_string(&path).expect("read settings");
|
||||||
|
assert!(!text.contains("password"));
|
||||||
|
assert_eq!(Settings::load(path).expect("load settings"), settings());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn key_description_is_stable_but_scoped_to_connection_and_user() {
|
||||||
|
let first = key_description(&settings());
|
||||||
|
assert_eq!(first, key_description(&settings()));
|
||||||
|
let mut different = settings();
|
||||||
|
different.username = "moderator".into();
|
||||||
|
assert_ne!(first, key_description(&different));
|
||||||
|
assert!(first.starts_with(KEYRING_SERVICE));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc_fingerprint":1210007815774095306,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/reaper/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_primitive_alignment=\"16\"\ntarget_has_atomic_primitive_alignment=\"32\"\ntarget_has_atomic_primitive_alignment=\"64\"\ntarget_has_atomic_primitive_alignment=\"8\"\ntarget_has_atomic_primitive_alignment=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"15429304387725512996":{"success":true,"status":"","code":0,"stdout":"rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: x86_64-unknown-linux-gnu\nrelease: 1.99.0\nLLVM version: 23.1.1\n","stderr":""}},"successes":{}}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Signature: 8a477f597d28d172789f06886806bc55
|
||||||
|
# This file is a cache directory tag created by cargo.
|
||||||
|
# For information about cache directory tags see https://bford.info/cachedir/
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
db8a3897bf88e90e
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"std\"]","declared_features":"[\"arbitrary\", \"bytemuck\", \"example_generated\", \"serde\", \"serde_core\", \"std\"]","target":7691312148208718491,"profile":11926785003450549200,"path":5443464120213635024,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bitflags-3a99da603c7fdadf/dep-lib-bitflags","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ece9249134a10c9b
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[]","target":4098124618827574291,"profile":11926785003450549200,"path":5465649014904815144,"deps":[[10520923840501062997,"generic_array",false,16493912397480899531]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/block-buffer-a49e7b74df05ed56/dep-lib-block_buffer","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
51618e1016478289
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"core\", \"rustc-dep-of-std\"]","target":13840298032947503755,"profile":11926785003450549200,"path":11058792650154348649,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-1e9c5a118a245144/dep-lib-cfg_if","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
5dcedd5e9d0ad442
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[]","target":2330704043955282025,"profile":11926785003450549200,"path":1896198174504173641,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cpufeatures-c66ff8dcdd82082d/dep-lib-cpufeatures","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
6d374d5a26a84bb7
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"std\"]","declared_features":"[\"getrandom\", \"rand_core\", \"std\"]","target":12082577455412410174,"profile":11926785003450549200,"path":3582492621506403237,"deps":[[6918147871599447195,"typenum",false,9002095519579012623],[10520923840501062997,"generic_array",false,16493912397480899531]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/crypto-common-1294f8b1d82dd2b1/dep-lib-crypto_common","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
a468b2bd6ae8db47
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"alloc\", \"block-buffer\", \"core-api\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"blobby\", \"block-buffer\", \"const-oid\", \"core-api\", \"default\", \"dev\", \"mac\", \"oid\", \"rand_core\", \"std\", \"subtle\"]","target":7510122432137863311,"profile":11926785003450549200,"path":7436233737715114717,"deps":[[6039282458970808711,"crypto_common",false,13207835214871345005],[10626340395483396037,"block_buffer",false,11172482022744844780]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/digest-0a771f46afd19aae/dep-lib-digest","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
42f52b8560b1f4f5
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"js\", \"std\"]","target":9543367341069791401,"profile":11926785003450549200,"path":17421528255653485375,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/fastrand-c3dd370172903a25/dep-lib-fastrand","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
2bad86464f8bacf9
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[10520923840501062997,"build_script_build",false,10090097976054138307]],"local":[{"Precalculated":"0.14.7"}],"rustflags":[],"config":0,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
cbb342e0ef25e6e4
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"more_lengths\"]","declared_features":"[\"more_lengths\", \"serde\", \"zeroize\"]","target":13084005262763373425,"profile":11926785003450549200,"path":4332620598671424490,"deps":[[6918147871599447195,"typenum",false,9002095519579012623],[10520923840501062997,"build_script_build",false,17990907784040197419]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/generic-array-d6b2188deed735b3/dep-lib-generic_array","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
c345984ba63a078c
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"more_lengths\"]","declared_features":"[\"more_lengths\", \"serde\", \"zeroize\"]","target":12318548087768197662,"profile":11528375766455597691,"path":11282514436624024422,"deps":[[5398981501050481332,"version_check",false,9141506819046141128]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/generic-array-e1c281c23bd1f564/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
a9311b454b237ddf
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"std\", \"sys_rng\", \"wasm_js\"]","target":5479159445871601843,"profile":15892100710820588111,"path":1280497377378559200,"deps":[[15482175856213997617,"cfg_if",false,9908560290261131601],[17989731678791879549,"build_script_build",false,15934124068954184352],[18070707816531966863,"libc",false,6441745632629918148]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-00989355ab645f57/dep-lib-getrandom","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
e3f27596a9e196a9
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"std\", \"sys_rng\", \"wasm_js\"]","target":2835126046236718539,"profile":3667494010424785699,"path":9430382405154673595,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-55483aa63909d659/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
a01a04096b6121dd
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[17989731678791879549,"build_script_build",false,12220202757406454499]],"local":[{"RerunIfChanged":{"output":"debug/build/getrandom-5ac76cfe40e3f577/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
b979701db92ef271
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"no-panic\"]","target":18426369533666673425,"profile":11926785003450549200,"path":13704350446160961929,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/itoa-5b56393bc94cfad5/dep-lib-itoa","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
c48954e685ad6559
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":17682796336736096309,"profile":4257197734456832517,"path":6326217517659532402,"deps":[[18070707816531966863,"build_script_build",false,6444638157452121161]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-46f5cd6a37ccddc8/dep-lib-libc","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
4994dc5042f46f59
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[18070707816531966863,"build_script_build",false,13897737912217593662]],"local":[{"RerunIfChanged":{"output":"debug/build/libc-92b3d665bd4b3463/output","paths":["build.rs"]}},{"RerunIfEnvChanged":{"var":"LIBC_BUILD_VERBOSE","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_FREEBSD_VERSION","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
3e67356fffaedec0
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":5408242616063297496,"profile":15490715990627648744,"path":18309442658069074778,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-f61333b787d0680a/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
d67e0d33af5963f6
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"auxvec\", \"elf\", \"errno\", \"general\", \"ioctl\", \"no_std\"]","declared_features":"[\"auxvec\", \"bootparam\", \"btrfs\", \"core\", \"default\", \"elf\", \"elf_uapi\", \"errno\", \"general\", \"if_arp\", \"if_ether\", \"if_packet\", \"if_tun\", \"image\", \"io_uring\", \"ioctl\", \"landlock\", \"loop_device\", \"mempolicy\", \"net\", \"netlink\", \"no_std\", \"prctl\", \"ptrace\", \"rustc-dep-of-std\", \"std\", \"system\", \"vm_sockets\", \"xdp\"]","target":5772965225213482929,"profile":16926302248770857990,"path":9133322017746189832,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/linux-raw-sys-6909a3bb65c2afb1/dep-lib-linux_raw_sys","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
df0205a005ee3914
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"alloc\", \"std\"]","declared_features":"[\"alloc\", \"core\", \"default\", \"libc\", \"logging\", \"rustc-dep-of-std\", \"std\", \"use_std\"]","target":11745930252914242013,"profile":11926785003450549200,"path":17024294999599420469,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/memchr-e16633741164b756/dep-lib-memchr","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
fe851b4f825a6448
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"alloc\", \"race\", \"std\"]","declared_features":"[\"alloc\", \"atomic-polyfill\", \"critical-section\", \"default\", \"parking_lot\", \"portable-atomic\", \"race\", \"std\", \"unstable\"]","target":17524666916136250164,"profile":11926785003450549200,"path":3218264518077823566,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/once_cell-e0cacd25ac9ca48d/dep-lib-once_cell","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
df88400fc081707b
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[16346726298725429545,"build_script_build",false,9105682103552064299]],"local":[{"RerunIfChanged":{"output":"debug/build/proc-macro2-43d6a45c41cd7ac9/output","paths":["src/probe/proc_macro_span.rs","src/probe/proc_macro_span_location.rs","src/probe/proc_macro_span_file.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
7f366e182c5e65dd
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":369203346396300798,"profile":11528375766455597691,"path":17009680396049250132,"deps":[[16346726298725429545,"build_script_build",false,8894751925946321119],[17795627090660149937,"unicode_ident",false,16862586366045555258]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-5eedf25ae708e3eb/dep-lib-proc_macro2","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
2b3bda13a1e15d7e
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":5408242616063297496,"profile":11528375766455597691,"path":9266844504976584239,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-a8d356aba312f19c/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
7eed0d36dddc0c38
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":5244445300240561903,"features":"[\"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":8313845041260779044,"profile":11528375766455597691,"path":18292718420730603895,"deps":[[8949245912927223590,"build_script_build",false,734989395155135820],[16346726298725429545,"proc_macro2",false,15953260798511298175]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-2f2e43da6b031e20/dep-lib-quote","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
334128b3983023c4
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user