Skip to content

Do not ask a human about a ping - #49

Merged
sepehr-safari merged 1 commit into
mainfrom
ping-never-asks-a-human
Aug 11, 2026
Merged

Do not ask a human about a ping#49
sepehr-safari merged 1 commit into
mainfrom
ping-never-asks-a-human

Conversation

@sepehr-safari

Copy link
Copy Markdown
Contributor

Every request the allowlist permitted went to the approval queue, and submit parks the calling thread until somebody answers or two minutes pass. That caller is the relay serve loop, so one unanswered request stops the signer answering anything at all.

Most of what arrives does not touch the key. connect and logout move a client in and out of the authorized set, ping is liveness, and get_public_key returns a value already printed in the bunker:// token the user hands out. None of them is a decision a person can usefully make, and each one sitting in the queue is a prompt that teaches people to click approve without reading.

It was also a way to switch the signer off. ping and get_public_key are answered for clients that have not connected, deliberately, so a stranger who knew the bunker pubkey could send one ping every two minutes and keep the signer permanently busy without ever presenting the connect secret. Requiring a connect first does not help here, because these two are exactly the methods that do not require it.

Only sign_event, nip44_encrypt and nip44_decrypt reach a person now. An unrecognised method still does: the bunker rejects it afterwards, but a name this does not know is not something to wave through here.

On the test

It asserts the absence of a prompt by asserting speed. The broker gets a short timeout and nothing resolves it, so anything that escalated would block and come back denied; returning approve immediately is the proof it never reached the queue. Checked against the bug: with the guard removed, that test fails and the rest still pass.

Every request the allowlist permitted went to the approval queue, which
parks the calling thread until somebody answers or two minutes pass. That
caller is the relay serve loop, so one unanswered request stops the
signer answering anything at all.

Most of what arrives does not touch the key. `connect` and `logout` move
a client in and out of the authorized set, `ping` is liveness, and
`get_public_key` returns a value already printed in the `bunker://` token
the user hands out. None of them is a decision a person can usefully
make, and each one sitting in the queue is a prompt that teaches people
to click approve without reading.

It was also a way to switch the signer off. `ping` and `get_public_key`
are answered for clients that have NOT connected, deliberately, so a
stranger who knew the bunker pubkey could send one ping every two minutes
and keep the signer permanently busy without ever presenting the secret.
Requiring a connect first does not help here, because these two are
exactly the methods that do not require it.

Only `sign_event`, `nip44_encrypt` and `nip44_decrypt` reach a person
now. An unrecognised method still does: the bunker rejects it afterwards,
but a name this does not know is not something to wave through.

The new test asserts the absence of a prompt by asserting speed. The
broker is given a short timeout and nothing resolves it, so anything that
escalated would come back denied; returning approve at once is the proof
it never went to the queue.
@sepehr-safari
sepehr-safari merged commit b5115a0 into main Aug 11, 2026
3 checks passed
@sepehr-safari
sepehr-safari deleted the ping-never-asks-a-human branch August 11, 2026 10:42
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