Docs (lambda-extension): add warning about caching re. distributed tracing headers (#28118)

* add warning about usage of distributed tracing headers in cacheable requests;

* Update lambda-extension.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
This commit is contained in:
Andrew Talbot
2024-08-27 13:15:50 -04:00
committed by GitHub
parent c8c783c2a2
commit 489cf35208

View File

@@ -243,6 +243,15 @@ request will be forwarded to Vault and the response returned and cached.
Currently, the cache key is a hash of the request URL path, headers, body, and
token.
<Warning title="Distributed tracing headers may negate the cache">
The Vault Lambda Extension cache key includes headers from proxy requests. As
a result, distributed tracing headers like `traceparent` can lead to
individualized hashes that make repeated requests appear unique and cause cache
misses.
</Warning>
Caching may also be enabled for all requests by setting the environment variable
`VAULT_DEFAULT_CACHE_ENABLED` to `true`. Then all requests will be fetched and/or
cached as though the header `X-Vault-Cache-Control: cache` was present. Setting