Playing with SW2 relay by nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpz4mhxue69uhkvun9deejuat50phjummwv5hsz8rhwden5te0wfjkccte9e3xjarrda5kuurpwf4jucm0d5hsz9thwden5te0wfjkccte9e6hg7r09ehkuef0avzrjf

I got a docker compose setup working by copying nostr:nprofile1qqswa8vhnelpgx9f7arjhtuzmjtqs2sdgfgmw77tzu9xankf87kl7eqppemhxue69uhkummn9ekx7mp0qyfhwumn8ghj7am0wsh82arcduhx7mn99uq3kamnwvaz7tmgv9mx2m3wv93kx6t0d3ujuum0vd5kzmp0gy8dgf's one from HAVEN.

Is there any benefit to sharing this?

Write auth working successfully.

Now to figure out read auth.

Reply to this note

Please Login to reply.

Discussion

Maybe SW2 doesn't do read auth?

Can anyone recommend a relay that does NIP-42 auth before allowing a user to read and event?

#asknostr

Looking forward to more small communities based on relays. Relay operators are like moderators of Reddit communities. Perhaps relays need a user-friendly dashboard for easier management.

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,

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!