feat(keychain): Linux で secret-service を優先シークレットストアにする#35
Merged
Conversation
GUI デスクトップに原則存在する secret-service (gnome-keyring / KWallet) を keyutils より優先し、at-rest 暗号化 + 再起動永続を得る (notedeck-dev/notedeck#786)。 選択は D-Bus 接続可否ではなく roundtrip probe で行う。WSL2 の gnome-keyring のように「daemon は応答するが default collection が無く 書込だけ失敗する」中間状態があり、接続成功だけで選ぶと永続と誤認する ため (実機で確認)。probe に失敗した環境は従来どおり keyutils に劣化し、 再起動非永続なので DB フォールバックが正となる (notedeck#785 の is_persistent() ゲートにそのまま乗る)。 secret-service が使える環境では、既存の lazy migration が DB の平文 トークンを secret-service へ載せ替えて DB をクリアする。 zbus-secret-service-keyring-store 0.3 (keyring-core 0.7 互換, pure Rust) を rt-async-io-crypto-rust で採用 — openssl 非依存、tokio と実行時競合 しない。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 16, 2026
Closed
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.
なぜ
notedeck-dev/notedeck#786 の実装。#785 で Linux (keyutils) は「再起動非永続 → DB フォールバックを残す」挙動にしたが、GUI デスクトップに原則存在する secret-service (gnome-keyring / KWallet) を使えば at-rest 暗号化 + 再起動永続が得られ、DB から平文トークンが自然に消える。
設計の要点
ReadAlias defaultが/を返し、書込はresult not returned from SS APIで失敗)。接続成功だけで選ぶと永続ストアと誤認して危険is_persistent()が false → DB フォールバック維持(#785 の仕組みにそのまま乗る、フラグ・設定追加なし)zbus-secret-service-keyring-store 0.3(keyring-core 0.7 互換・pure Rust・openssl 非依存・async-io なので tokio と実行時競合しない)。1.0 系は keyring-core 1.0 が必要なため、エコシステム一括更新は別途テスト
is_persistent_matches_selected_store: 選択された store の vendor と永続性の整合を検証(secret-service 環境 / keyutils 環境の両方で意味を持つ)roundtrip_against_real_store(--ignored): 実環境 keyring への store/get/delete roundtrip。WSL2 実機で「secret-service 拒否 → keyutils 劣化 → roundtrip 成功」を確認済み未検証
🤖 Generated with Claude Code