init and serve leave an existing TLS private key readable by other users
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
crates/app/src/serve_helpers.rs(77行目付近)の check_config_permissions から始めてください。この関数はすでに警告を出し、設定を0600に設定しています。server.tls.key_path にも同じことを行ってください。init でスキップされる経路は crates/app/src/init_helpers.rs の generate_tls_cert_if_needed です。0644の鍵から始まるテストで警告が表示され、最終的に鍵が0600になれば、serve と init の両方で完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
Neither init nor serve checks the mode of an existing TLS private key, so a key.pem that other users can read stays readable.
initskips certificate generation when bothcert.pemandkey.pemexist (generate_tls_cert_if_needed,crates/app/src/init_helpers.rs). It checks that the certificate covers the requested names and does not look at the key's mode.servechecks only the config file's mode:check_config_permissions(crates/app/src/serve_helpers.rsline 77) warns and sets the config to 0600 when group or other bits are set. Read from the code, nothing does the same forserver.tls.key_path(default~/.extenddb/tls/key.pem).
A key ends up wider than 0600 when an older init stopped between writing the key and setting its mode (#709, fixed in #766 for new keys), or when an operator copies a key in with the umask mode.
Measured
2 November 2026, a build of #766 (7cb517498), a fresh HOME, umask 022. init created key.pem at 0600. After chmod 0644 key.pem, a second init with a new config path and a new SQLite path printed --- TLS certificate already exists, skipping generation., exited 0, and left key.pem at 0644.
Expected
Treat the key file as check_config_permissions treats the config: when server.tls.key_path has group or other bits set, serve warns and sets it to 0600, and the init skip path does the same for ~/.extenddb/tls/key.pem. A test starts from a 0644 key and checks the warning and the 0600 result.
- 主要言語
- Rust
- スター
- 517
- フォーク
- 60
- 平均マージ
- 5日 4時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ExtendDB/extenddb のほかの issue
-
ci:stability sqlite
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 4 日以内に返信
-
backend:cassandra ci:stability
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
ExtendDB/extenddb の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
tauri-apps/tauri#16476 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fish-shell/fish-shell#13084 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug: merge_insert does not detect concurrent inserts of the same FixedSizeBinary primary key対応中かも @lance-gatefixer が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
lance-format/lance#10811 ·
メンテナーはふだん 2 日以内に返信
-
provider testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mishraprafful/multihull#234 ·
メンテナーはふだん 1 日以内に返信