Hey Rod. GM. If you think that it will be useful to other people go for it (a few folks asked for whitelisting multiple IPs on Haven).

Adding NIP-42 auth for all queries should be trivial on any Khatru based relay, including SW2. See: https://khatru.nostr.technology/core/auth#signaling-to-the-client-that-a-specific-query-requires-an-authenticated-user

Cheers,

Reply to this note

Please Login to reply.

Discussion

GM! We may have different definitions of trivial. If I have questions as I go may I trouble you?

For sure! And I didn’t mean to diminish the difficulty of the task. By "trivial," I just meant that Khatru has built-in functionality to read auth credentials, as well as to reject events and filters. Since you're working with my Dockerfile, you already have an easy way to compile and build, so all the pieces are in place. :)

Have a look at the cookbook above and the `main.go` file in SW2 (see how utxo has rejected events? You can do sometning similar for filters, but using NIP-42 auth to obtain the pubkey as per the cookbook). If you still have any doubts, feel free to ask away!