Skip to content

docs: note that SqliteCacheStore stores data unencrypted - #6199

Merged
mcollina merged 1 commit into
nodejs:mainfrom
bardrop:docs-sqlite-cache-plaintext
Nov 12, 2026
Merged

mcollina merged 1 commit into
nodejs:mainfrom
bardrop:docs-sqlite-cache-plaintext

Conversation

@bardrop

@bardrop bardrop commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

This relates to...

Refs #4122

Rationale

In #4122 the reporter found that a bearer token ended up in plain text in the SQLite cache file, because the response had Vary: Authorization. The discussion landed on not hashing keys, and on @metcoder95's idea of documenting this so users know what gets written to disk.

Changes

Adds a short paragraph to the SqliteCacheStore docs saying:

  • the database is not encrypted or hashed;
  • the URL (with query string), response headers and body, and request headers named in Vary (e.g. Authorization, Cookie) are stored as plain text at location;
  • responses to requests with Authorization are only stored when the response allows it (public, s-maxage, must-revalidate, per RFC 9111 §3.5), and no-store keeps a response out entirely.

I checked the plain-text claim locally: writing an entry with Vary: authorization and a query-string token, both strings show up in the .db file.

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Refs: #4122
Signed-off-by: Mradul Singh <msingh@dealmeridian.com>
@metcoder95
metcoder95 requested a review from mcollina November 12, 2026 09:10

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
mcollina merged commit 7b6cf0a into nodejs:main Nov 12, 2026
37 checks passed
@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (691eb16) to head (90ff551).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6199      +/-   ##
==========================================
- Coverage   91.68%   91.67%   -0.01%     
==========================================
  Files         113      113              
  Lines       44449    44449              
==========================================
- Hits        40751    40748       -3     
- Misses       3698     3701       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot mentioned this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants