penumbra-zone / penumbra

Penumbra is a fully private proof-of-stake network and decentralized exchange for the Cosmos ecosystem.
https://penumbra.zone
Apache License 2.0
381 stars 296 forks source link

Change Rust view service to use token-based authentication mechanism.. #1683

Closed hdevalence closed 1 year ago

hdevalence commented 1 year ago

Is your feature request related to a problem? Please describe.

See #1556.

Describe the solution you'd like

Following #1682, we should change the Rust implementation of the view service to use the new auth mechanism. This is also an opportunity to clean up the initialization flow.

Currently, we have code that initializes a view server with the user's full viewing key. Instead, we'll now use the auth mechanism as a registration / initialization step:

Because of the last point, it's probably worth waiting to make this change until after we have a more flexible custody story for pcli.

hdevalence commented 1 year ago

We shouldn't use that mechanism at all, and instead just use normal GRPC auth using bearer tokens, as in https://github.com/hyperium/tonic/blob/master/examples/src/authentication/server.rs