Hierarchical Keyring: cold-cache stampede — N concurrent decrypts → N DynamoDB/KMS calls
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- aws, node.js, typescript
調査の方向性
Node Hierarchical Keyring の getBranchKeyMaterials パスから開始し、materials cache がコールドキャッシュの検索をどのように処理するかを追跡します。1 つのブランチキー・バージョンに対する復号または暗号化を同時実行して問題を再現し、in-flight の keystore リクエストが 1 つだけ共有されること、settled エントリが削除されること、失敗したリクエストを再試行できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Security issue notifications
If you discover a potential security issue in the AWS Encryption SDK we ask that you notify AWS Security via our vulnerability reporting page. Please do not create a public GitHub issue.
Problem:
The Node Hierarchical Keyring doesn't de-dupe concurrent branch-key lookups. If I fire a lot of decrypts for the same branch key at once against a cold cache, they all miss the cache together (it's only filled after the keystore call returns), so each one hits the keystore on its own.
So instead of one lookup I get N DynamoDB GetItem + N KMS Decrypt calls. Easy to repro: await Promise.all of ~3000 decrypts for the same key version, and you see ~3000 keystore calls instead of 1. Encrypt has the same problem since it shares the same code path.
Solution:
Add single-flight to getBranchKeyMaterials: on a miss, the first caller starts the keystore fetch and stores the in-flight promise (keyed by cache entry id); everyone else for the same key awaits that promise instead of starting their own. The entry is dropped once it settles, so the materials cache still owns caching and TTL, and a failed request isn't shared — the next call just retries.
Out of scope:
The legacy caching CMM has the same gap but it's a separate path, so I'm not touching it here.
- 主要言語
- TypeScript
- スター
- 260
- フォーク
- 68
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-encryption-sdk-javascript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/aws-encryption-sdk-javascript#1656 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
aws/aws-encryption-sdk-javascript#1691 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
aws/aws-encryption-sdk-javascript#1665 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
aws/aws-encryption-sdk-javascript#1520 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
aws/aws-encryption-sdk-javascript#1192 · コメント 3 件 ·
aws/aws-encryption-sdk-javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·