Reject unknown config keys at startup
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
internal/config/config.goで、issueからリンクされているYAMLローダーを確認し、次にinternal/configのテストと本文で挙げられている設定ファイルを確認します。不明なキーが行番号を示すエラーとともに拒否される一方で、dev/config.yamlとサンプル設定ファイルは引き続きデコードできることを確認します。また、これは起動時の動作を変更するため、issueではリリースノートも求めています。
索引モデルが issue の本文から書いたものです。
説明
The config loader ignores keys it doesn't recognize. A misspelled key loads without error, and the setting it was meant to change keeps its default.
#329 shows why this matters. An operator who follows the RFC's KEK rotation steps writes decryptOnlyURIs where the proxy reads decryptURIs. The proxy starts normally, the old KEK is never registered, and every payload sealed under it fails to open. The mistake only surfaces later, at the first old payload.
Proposal
Pass yaml.DisallowUnknownField() to the loader so an unknown key fails at startup. With it on, the config from #329 is rejected with a pointer to the exact line:
[5:5] unknown field "decryptOnlyURIs"
2 | encryption:
3 | default:
4 | uri: testing://...
> 5 | decryptOnlyURIs:
^
Impact
This is a breaking change for any deployment whose config carries a key the proxy doesn't read. Such a deployment would stop starting after the upgrade, so the change needs a release note.
Nothing in this repository is affected. With the option on, dev/config.yaml and every examples/*/config.yaml decode with no unknown keys, and the internal/config and internal/codecserver tests pass.
- 主要言語
- Go
- スター
- 32
- フォーク
- 14
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 62
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
temporalio/temporal-proxy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
temporalio/temporal-proxy#329 ·
メンテナーはふだん 1 日以内に返信
-
Reject requests when translated Namespace is not a valid Cloud Namespace再び着手できるかも @kriyanshii が 17 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
temporalio/temporal-proxy#281 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Don't seal compute provider and scaler details on worker deployment calls対応中かも @rahulsjha が今日担当しました。 オープンenhancement good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
temporalio/temporal-proxy#334 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
temporalio/temporal-proxy#178 ·
メンテナーはふだん 1 日以内に返信
temporalio/temporal-proxy の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
seriousm4x/UpSnap#1786 ·
-
bug feedback ui/ux
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
peasant-labs/peasant#1307 ·
メンテナーはふだん 1 日以内に返信
-
Reformat test names for single-protocol tests to start with Protocol/, i.e. gRPC/ or Websocket/オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
connectrpc/conformance#1211 ·
メンテナーはふだん 1 日以内に返信
-
bug effort:s impact:med raised-by:desk risk:low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
medici-finance/assay#8342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
hardening
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
inference-sim/inference-sim#2821 ·
メンテナーはふだん 1 日以内に返信