Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: NWA auth for self-hosted hubs #1016

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Feat: NWA auth for self-hosted hubs #1016

wants to merge 13 commits into from

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Jan 20, 2025

Closes #328

TODOs:

  • budget might still make sense if you have superuser access (new apps can be created to bypass the permission) - but users need to understand that other apps can be created with larger budgets, circumventing it. - If someone installs a malicious version of Alby Go it could drain a user's funds.
  • Limit superuser scope to Alby Go for now
  • TODOs in feat: nwc create_connection command (WIP) #907
  • Instead of adding the create connection method to the normal create connection UI, make Alby Go a custom detail page
  • Use standard NWC info event instead of new NWA event
  • Ensure superuser permission cannot be included as part of standard deeplink flow and NWA flow - an attacker could take advantage of this - how do we explicitly limit it to Alby Go?
  • User needs to be very clearly warned to be careful with this connection secret and not put them in other apps
  • create_connection: no spec for now
  • NWA changes - first implement in Bitcoin Connect. Make it as simple as possible for a library to be implemented on different platforms
  • confirm way of passing lud16 as tag info event (but lightning addresses in profile metadata are leaked anyway in nostr and it's generally considered public info? the Alby relay does not allow crawling info events but this will not apply to other relays.)

Next steps:

  • review UX with Jakub
  • NWA in bitcoin connect
  • UI for accepting a connection in Alby Go (MVP: show all the settings, and Alby Go can only choose yes or no. Ensure connection secret with create_connection method cannot be exported OR remove export function completely!)

Notes for spec later:

  • p tag added to NWC info event
  • lud16 tag added to NWC info event
  • NWA:
    • no new NWA event - app subscribes to info event by p tag (same style as command responses - + no relay changes necessary)
    • no NWA secret
    • parameter changes:

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.

Design new 1-click App Connection flow that works on all environments
1 participant