diff options
| author | Adam Soltys <[email protected]> | 2026-08-22 09:54:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-22 10:16:09 -0700 |
| commit | 15c3aba306f35953f965acb9f83a83b5fff81dbe (patch) | |
| tree | 9ee2e34c3c95bd6ce6df61d5b5f3efec4a4b710e /scripts | |
| parent | d6cc84ba8ebab2d1d44693e866b930e86a10465d (diff) | |
| download | coinos-server-15c3aba306f35953f965acb9f83a83b5fff81dbe.tar.gz coinos-server-15c3aba306f35953f965acb9f83a83b5fff81dbe.zip | |
nwc: 404 missing connections + require key rotation to revive retired ones
Damus's one-click setup derives its NWC secret deterministically from the
user's nsec, so after the credential invalidation its re-mint reused the
same retired pubkey and could never recover; meanwhile GET /app/:pubkey
crashed into a 500 on missing records instead of the 404 the client needs
to know to re-create the connection.
We store client-supplied connection secrets (verified: all 2744 Damus app
records in prod carry one), so a disclosed DB means disclosed secrets and
re-authorizing the same pubkey would re-authorize the leaked bearer
credential. POST /app therefore rejects any pubkey that is quarantined or
predates nwc:credential-cutoff with an explicit 403 telling the client to
mint a fresh secret; a fresh secret yields a fresh pubkey and passes.
Owner posts refresh the record's created epoch so live connections stay
clear of the cutoff, and GET /apps drops stale set members instead of
500ing the listing.
Damus needs a versioned derivation salt so one-click can mint a genuinely
new secret; PR submitted separately.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
