Hierarchical Keyring: cold-cache stampede — N concurrent decrypts → N DynamoDB/KMS calls
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- aws, node.js, typescript
Línea de trabajo
Comienza en la ruta getBranchKeyMaterials de Node Hierarchical Keyring y sigue cómo la caché de materiales gestiona una consulta con la caché fría. Reproduce el problema con descifrados o cifrados concurrentes para una versión de clave de rama y verifica que se comparta una única solicitud de keystore en curso, que se eliminen las entradas resueltas y que una solicitud fallida se pueda reintentar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 260
- Forks
- 68
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-encryption-sdk-javascript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
aws/aws-encryption-sdk-javascript#1656 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
aws/aws-encryption-sdk-javascript#1691 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
aws/aws-encryption-sdk-javascript#1665 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
aws/aws-encryption-sdk-javascript#1520 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
aws/aws-encryption-sdk-javascript#1192 · 3 comentarios ·
Todos los issues de aws/aws-encryption-sdk-javascript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
danielmiessler/LifeOS#2218 ·