Repository navigation
Require signed wallet sessions for seller invoice access - #589
Open
woahwhattheheck wants to merge 4 commits into
Open
woahwhattheheck wants to merge 4 commits into
woahwhattheheck wants to merge 4 commits into
Conversation
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A public pay link exposes the seller address, so using that address as a workspace credential allowed any link holder to request private customer fields and mint invoices under another wallet. This change makes seller access depend on proof of wallet control and retires the indefinitely reusable cancellation signature.
Closes #586.
What changes
signTransactionfor authentication. The browser retains tokens only in memory, invalidates them synchronously on account/network/disconnect changes, aborts stale seller requests and retries one 401 within the original wallet session. Public checkout remains anonymous.The additional changed files are existing test fixtures and script callers that previously used an unsigned seller key. No dependency, account-table or database-schema change is required.
Acceptance coverage
customerEmailis absent.Validation
Clean cloud run 37204495861 checked out immutable source
d9322f3f5a11533d46825c2894034e10214a3192on Ubuntu 24.04, Node 24.21.0 and npm 11.19.0, using the repository's existing commands and unchanged lockfiles:npm ci,npm run typecheck,npm testnpm ci,npm run lint,npm run typecheck,npm testnode --test "tests/**/*.test.mjs"The run publishes backend, frontend and shared-test logs as seven-day artifacts. It requires no seller/payer secrets; the optional live Testnet evidence step remains separately secrets-gated.
Deployment notes
Configure the dedicated challenge signing key, home/API domains and HMAC key ring described in docs/SELLER_AUTH.md. Existing seller clients must authenticate; there is no development or legacy-cancel bypass.
Challenge nonces are bounded and process-local. Issuance and redemption must reach the same process for the five-minute exchange; a restart or another process rejects an unknown challenge and requires a fresh one. Session verification is stateless across processes sharing the same domain, network and key ring. Cross-process challenge redemption would require shared atomic nonce storage.
Original-contributor claim and conditional compensation
/claim #586
As the original contributor, I request review and acceptance of this existing implementation for issue #586. I am claiming any eligible GrantFox OSS reward under the current sponsor campaign terms. If this contribution is accepted and eligible, please confirm the approved amount (if any), award allocation, payout instructions and payment timing. The
Maybe Rewardedlabel is not evidence of guaranteed funding, acceptance or payment.