Skip to content

[FR] Support for NIP-42- Authentication of clients to relays #64

@UTXOnly

Description

@UTXOnly

Motivation

  • NIP-42 allows clients to authenticate to relays
    • For example:

A relay may want to require clients to authenticate to access restricted resources. For example,
A relay may request payment or other forms of whitelisting to publish events -- this can naïvely be achieved by limiting publication to events signed by the whitelisted key, but with this NIP they may choose to accept any events as long as they are published from an authenticated user;
A relay may limit access to kind: 4 DMs to only the parties involved in the chat exchange, and for that it may require authentication before clients can query for that kind.
A relay may limit subscriptions of any kind to paying users or users whitelisted through any other means, and require authentication.

  • This relay does not currently support paid subscriptions or allowlisted users, so the focus of this feature will be on preventing users that are not part of the conversation from retrieving those notes which contain metadata about which pubkeys are speaking to each other and at what time.

Current State

  • Relay does not authenticate any clients
  • All events are queryable by any client, including kind 4 DM notes

Desired State

  • Relay will authenticate any users requesting kind 4 DM notes
    • Successful authentication will allow the client to query kind 4 DM notes
    • Failure to authenticate will result in a CLOSE message ending that subscription

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions