Skip to content

Design .urbit claimer relay server architecture #13

@hanfel-dovned

Description

@hanfel-dovned

See #11 and #12. Users of the NEAR app on Urbit will need to be able to claim a .near account that matches their Urbit ID. Because most Urbit planets are on the L2 roll-up, this can't be a permissionless on-chain operation, and will instead need to go through a server run by either the Urbit Foundation or NEAR Foundation. We'll likely have the NEAR Foundation run this server, so to lighten the maintenance load on them, we're considering not running this server on Urbit.

A development benefit here is that it saves us from having to do RPC calls from within a Gall agent. A marketing benefit is that we get to illustrate the use of Auth Server.

However, Auth Server still requires a running Urbit ship:

  1. A user tries to login to the site example.com by entering their ship ~sampel-palnet.
  2. example.com sends an authorization request to their ship ~master running Auth Server.
  3. Auth Server on ~master sends the request to the Auth Client app on ~sampel-palnet.
  4. Auth on ~sampel-palnet gets the request and makes an HTTP request for http://example.com/.well-known/appspecific/org.urbit.auth.json and retrieves an attestation that ~master is an agent of example.com.
  5. Auth Client verifies the signature in the attestation using the pubkey of ~master it got from Azimuth, then displays an authorization request for the user.
  6. The user of ~sampel-palnet clicks "Approve" in Auth Client.
  7. Auth Client on ~sampel-palnet sends an update to Auth Server on ~master saying the request was approved.
  8. Auth Server notifies example.com that the request was authorized.
  9. example.com logs the user in.

Authentication of an Urbit ID likely requires Urbit somewhere in the loop to make use of Ames. At that point, does it then make most sense to have only the one Gall agent acting as a relay server on NEAR's ship, as opposed to an Auth Server Gall agent working in conjunction with a standard web server? Is there something we can do here with lib-ames?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions