Join Nostr
2026-03-07 15:22:59 UTC

reidsomethings on Nostr: The Nip17 invoice DMs and the fhir rest api for connecting traditional outside ...

The Nip17 invoice DMs and the fhir rest api for connecting traditional outside medical facilities require nsec for signing and decrypting respectively. As it stands currently the practice key sits on the server in two different files. This weighs heavy on my mind and needs fixing.
My solution is a to create a separate "billing bot" keypair and a "FHIR API" keypair. These are purpose-limited identities:

-Billing bot keypair: only used to send NIP-17 invoice DMs. The key only has permission to send messages, not decrypt clinical data.

-FHIR API keypair: gets its own ECDH grants (kind 1013) just like a staff member would. It can decrypt patient data through the shared secret, but if compromised, you revoke its grants and rotate — same as firing a staff member.

The practice nsec stays offline. The risks after an exposure or server compromise goes from everything to just billing messages or read-only FHIR access depending on which key leaks.