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: w3-deal protocol #67

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

feat: w3-deal protocol #67

wants to merge 3 commits into from

Conversation

Gozala
Copy link
Collaborator

@Gozala Gozala commented Jul 18, 2023

First pass on the storacha/w3filecoin-infra#29 flow.

w3-deal.md Outdated Show resolved Hide resolved
w3-deal.md Outdated Show resolved Hide resolved
Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This iteration looks great! Thanks for putting it together

  1. we should present it to spade team and gather feedback sooner rather than later, so that we can understand if this is something that we can work together to land (including spade side of things). if not the case, we should reduce scope for now to only have interaction between storefront and agency in a perspective that someday they will be the same.
  2. should we spec how we would provide source URLs for each piece in this flow? could be good to have something in place we could also present their team to initiate dialog on that side of things too


## Overview

All the filecoin deals need to be signed by a Fil wallet, in order to avoid passing private keys to wallet _Storefront_ could delegate a capability to a sign a deal to a _Broker_ instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The broker that in this case would be the Agency, at least in first iteration where Agency and Broker are not the same. Think it would be good to make that clear, or at least describe Agency role above and make clear its role today

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I see now the HTTP interface section below. With that in mind, I would suggest to add a small note here still to avoid same confusion from readers until later

w3-deal.md Outdated Show resolved Hide resolved

_Agency_ could also re-delegate same unconstrained `deal/sign` UCAN capability to the _Agency_ (spade-proxy) allowing it to sign any deals.

This trade-offs increased security for convenience.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can delegate capability when we perform aggregate/offer individually per piece (aggregate). When spade-proxy receives the offer it can re-delegate to the broker. Given we can easily have this, should we consider to have it required instead of the long term solution?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should go for auth per offer, that said I think it's good to have both options listed. There is another tradeoff that I failed to communicate here, which is token per offer means that those tokens are likely to be included in requests and consequently can get leaked very easily. Long term tokens are likely exchanged ahead of time and out of bound, so they are less likely to get leaked in comparison to per-request approach.

w3-deal.md Outdated Show resolved Hide resolved
w3-deal.md Outdated Show resolved Hide resolved
w3-deal.md Outdated Show resolved Hide resolved

## Overview

All the filecoin deals need to be signed by a Fil wallet, in order to avoid passing private keys to wallet _Storefront_ could delegate a capability to a sign a deal to a _Broker_ instead.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
All the filecoin deals need to be signed by a Fil wallet, in order to avoid passing private keys to wallet _Storefront_ could delegate a capability to a sign a deal to a _Broker_ instead.
All the filecoin deals need to be signed by a Fil wallet, in order to avoid sharing wallet private keys, _Storefront_ could delegate a capability to a sign a deal to an _Agency_ or a _Broker_ arranging a deal on their _Storefront_s behalf.

How does this sound ?

w3-deal.md Outdated Show resolved Hide resolved
w3-deal.md Outdated Show resolved Hide resolved
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.

2 participants