Skip to content

Source Vault: password-only (one Netlify setting for stems) - #51

Merged
error404website merged 1 commit into
mainfrom
feat/source-vault
Oct 8, 2026
Merged

error404website merged 1 commit into
mainfrom
feat/source-vault

Conversation

@error404website

Copy link
Copy Markdown
Owner

Follow-up to #50, which merged before this change landed. The live vault currently shows VAULT OFFLINE because it expects six Netlify settings. After this merges, the vault works with just the password.

What changes

  • Prompts, lyrics and analysis are locked with the access key itself (PBKDF2-SHA256 → AES-256-GCM) in public/vault/data.enc.json, and the browser opens them when the right key is typed. No server sign-in, and no VAULT_KEY / VAULT_SECRET / VAULT_DATA_KEY settings.
  • Stems: one function, vault-stems.mjs, hands out GitHub's short-lived signed links from the private repo error404website/error404-vault (release stems, created, currently empty). It only does this for visitors who prove they know the key, and only for allow-listed file names.
  • Removes the old vault-unlock, vault-lock, vault-data and vault-stem functions.
  • Unlocking lasts for the browser tab, and LOCK forgets it.

The one Netlify setting (for stems only)

VAULT_GH_TOKEN: a fine-grained GitHub token with access to error404-vault only, Contents: Read-only. Without it, everything works and stems show "SOON".

Tested

  • npm run check passes.
  • End to end locally with the real function (desktop + iPhone):
    • Access: wrong key denied, right key → intro → vault, reload stays open, LOCK locks.
    • Playback: all songs play.
    • Server: fake proofs are rejected.
  • Real download link: uploaded a tiny test zip to the private release, fetched a signed link through the function and downloaded it, then deleted the test file.
  • Leak scan: no key, prompt or lyric text in the repo or build.

🤖 Generated with Claude Code

- Prompts, lyrics and analysis are locked with the access key itself (PBKDF2 → AES-256-GCM)
  in public/vault/data.enc.json and opened in the browser; no server sign-in
- One function, vault-stems.mjs, hands out signed links from the private repo to visitors
  who prove they know the key; needs only VAULT_GH_TOKEN
- Removes vault-unlock/lock/data/stem functions and the VAULT_KEY/SECRET/DATA_KEY settings

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@netlify

netlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for stirring-hamster-57bba9 ready!

Name Link
🔨 Latest commit eca4279
🔍 Latest deploy log https://app.netlify.com/projects/stirring-hamster-57bba9/deploys/6ac6ab04ab6a070008f37203
😎 Deploy Preview https://deploy-preview-51--stirring-hamster-57bba9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@error404website
error404website merged commit 5baa1a5 into main Oct 8, 2026
5 checks passed
@error404website
error404website deleted the feat/source-vault branch October 8, 2026 04:39
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.

1 participant