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

Introduce capabilities that upload/* and store/* APIs could use to decide whether to proceed or fail #495

Open
Gozala opened this issue Mar 7, 2023 · 1 comment

Comments

@Gozala
Copy link
Contributor

Gozala commented Mar 7, 2023

Right now upload/* uses space/info capability to decide whether to allow mutations on store/* and upload/*

https://github.com/web3-storage/w3protocol/blob/f0b1e737f4d2f1689c5da04ad5408b114928d2fe/packages/access-api/src/service/index.js#L77-L89

I think it was a workaround which we need to fix, so that those APIs would not fail when space is registered through new provider/add capability.

My suggestion would be to expose two different capabilities

  1. space/store/allocate that could succeed or fail depending if space has enough storage provided by storage provider.
  2. space/upload/use - That succeeds if space has active upload/* capability provider or fail if it has no such provider.
@Gozala
Copy link
Contributor Author

Gozala commented Mar 7, 2023

From @gobengo

What if you could we called the can= space/info/hasStorageProvider
2:56
more generally, a cap like space/info may provide a set of properties, but space/info/{property} would be granular to the specific property/attribute
2:56
(iirc ucans can have arbitrary number of /)
2:57
I think it is nice pattern to follow because it's inherently pretty easy to delegate (one-by-one) to any combination of properties that subset space/info (and therefore to avoid delegating permission to access properties other than those the issuer explicitly delegated) (edited)

Peeja pushed a commit to storacha/upload-service that referenced this issue Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.1](storacha/w3ui@vue-keyring-v4.1.0...vue-keyring-v4.1.1)
(2023-04-06)


### Bug Fixes

* more email type
([storacha#494](storacha/w3ui#494))
([355e794](storacha/w3ui@355e794))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this issue Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.1](storacha/w3ui@vue-keyring-v4.1.0...vue-keyring-v4.1.1)
(2023-04-06)


### Bug Fixes

* more email type
([storacha#494](storacha/w3ui#494))
([1c0db4f](storacha/w3ui@1c0db4f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

No branches or pull requests

1 participant