Zero's Raft WAL is not encrypted when the cluster runs with encryption at rest (predicate names in plaintext)
メンテナーはふだん 10 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
The unencrypted WAL is opened in dgraph/cmd/zero/run.go around line 317 with raftwal.Init, while worker/server_state.go uses raftwal.InitEncrypted for alphas. Reproduce with the steps in the issue and check whether zw/ contains the predicate name. Done means either Zero accepts --encryption and uses the encrypted WAL, or the encryption-at-rest docs state that Zero data is not encrypted. The maintainers still need to choose between these, so confirm the direction before writing code.
索引モデルが issue の本文から書いたものです。
説明
Summary
With --encryption key-file=... on every alpha, the alphas' postings (p/) and Raft WAL (w/) are encrypted.
Zero has no --encryption flag and opens its WAL with raftwal.Init (unencrypted), dgraph/cmd/zero/run.go
line 317 on main at e95fc2652. Zero's WAL holds the tablet map, so every predicate name of the schema is on
Zero's disk in plaintext. Predicate values are not (Zero does not receive them).
Predicate names can be confidential (they describe what a customer stores). The encryption-at-rest documentation
(https://docs.dgraph.io/installation/configuration/encryption-at-rest) says the feature "encrypts data stored on
disk" and does not say Zero is excluded.
Steps to reproduce
openssl rand 32 > enc_key
dgraph zero --my=localhost:5080 --wal zw &
dgraph alpha --my=localhost:7080 --zero=localhost:5080 --encryption "key-file=enc_key;" &
curl -s localhost:8080/alter -d 'zebraprobepredicate: string .'
curl -s -H 'Content-Type: application/json' 'localhost:8080/mutate?commitNow=true' \
-d '{"set":[{"zebraprobepredicate":"valueprobe123"}]}'
# stop both, then:
grep -r -a -l zebraprobepredicate p w zw # -> zw/00001.wal only
grep -r -a -l valueprobe123 p w zw # -> nothing
What was observed: on v25.5.0 plus fork changes that do not touch Zero or raftwal, with the predicate created
through the fork's schema loader rather than the /alter shown above, and a value written through /mutate:
with encryption on, the predicate name was found only in Zero's zw/00001.wal and the value nowhere; without
encryption both were also in the alpha's p/*.sst and w/*.wal. The steps above are the same sequence with plain
Dgraph calls; they were not run in exactly this form.
Expected
Either Zero accepts --encryption (and --vault) and opens its WAL with raftwal.InitEncrypted, as the alpha does
in worker/server_state.go, or the documentation states that Zero's data, including predicate names, is not
encrypted and should be protected by volume encryption.
- 主要言語
- Go
- スター
- 21.8k
- フォーク
- 1.6k
- 平均マージ
- 11日 7時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dgraph-io/dgraph のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 10 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
メンテナーはふだん 10 日以内に返信
-
Stale
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
dgraph-io/dgraph#9811 · コメント 1 件 ·
メンテナーはふだん 10 日以内に返信
-
Stale
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dgraph-io/dgraph#9810 · コメント 1 件 ·
メンテナーはふだん 10 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 10 日以内に返信
dgraph-io/dgraph の issue をすべて見る
似ている issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
DaoCloud/DaoCloud-docs#7839 ·
メンテナーはふだん 1 日以内に返信
-
Type: Enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
projectdiscovery/urlfinder#167 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
peterstace/simplefeatures#726 ·
-
area: import bug go good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fukubie/StockLlama#69 ·
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cloverworks-hq/rumpty-cli#95 ·
メンテナーはふだん 1 日以内に返信