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: content serve authorization (#1590) + set default gateway #99

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

fforbeck
Copy link
Member

@fforbeck fforbeck commented Dec 11, 2024

To enable a gateway to serve content from a specific space, we must ensure that the space owner delegates the space/content/serve/* capability to the Gateway. This delegation allows the Gateway to serve content and log egress events appropriately.

I created a new function authorizeContentServe for this implementation and included it in the createSpace flow. This is a breaking change because now the user is forced to provide the DIDs of the Content Serve services, and the connection, or skip the authorization flow.

Additionally, with the authorizeContentServe function, we can implement a feature in the Console App that enables users to explicitly authorize the Freeway Gateway to serve content from existing/legacy spaces.

  • New Functionality:
    • Added a new function, authorizeContentServe, in the w3up-client module to facilitate the delegation process. Integrated it with the createdSpace flow.
    • It also sets the Storacha Gateway as the default content server service in case the user doesn't provide any in the createSpace call, and doesn't use the skipGatewayAuthorization=true flag.
  • Testing: Introduced test cases to verify the authorization of specified gateways.
  • Fixes: Resolved issues with previously broken test cases (Egress Record).

Related Issues

@fforbeck fforbeck self-assigned this Dec 11, 2024
To enable a gateway to serve content from a specific space, we must
ensure that the space owner delegates the `space/content/serve/*`
capability to the Gateway. This delegation allows the Gateway to serve
content and log egress events appropriately.

I created a new function `authorizeContentServe` for this implementation
and included it in the `createSpace` flow. This is a breaking change
because now the user is forced to provide the DIDs of the Content Serve
services, and the connection, or skip the authorization flow.

Additionally, with the `authorizeContentServe` function, we can
implement a feature in the Console App that enables users to explicitly
authorize the Freeway Gateway to serve content from existing/legacy
spaces.

- **New Functionality:** Added a new function, `authorizeContentServe`,
in the `w3up-client` module to facilitate the delegation process.
Integrated it with the `createdSpace` flow.
- **Testing:** Introduced test cases to verify the authorization of
specified gateways.
- **Fixes:** Resolved issues with previously broken test cases (Egress
Record).

- storacha/project-tracking#158
- storacha/project-tracking#160
@fforbeck fforbeck force-pushed the feat/content-serve-auth branch from 0d4513d to 6f42347 Compare December 11, 2024 19:23
packages/cli/space.js Show resolved Hide resolved
@fforbeck fforbeck changed the base branch from fix/egress-record to main December 12, 2024 14:28
@fforbeck fforbeck force-pushed the feat/content-serve-auth branch from 580f93a to 4c03d6d Compare December 12, 2024 19:17
@fforbeck fforbeck force-pushed the feat/content-serve-auth branch from bfc9d68 to 81eb44c Compare December 16, 2024 14:09
@fforbeck fforbeck changed the title feat!: content serve authorization (#1590) feat: content serve authorization (#1590) + set default gateway Dec 16, 2024
@fforbeck fforbeck force-pushed the feat/content-serve-auth branch from 90baf03 to 8992687 Compare December 16, 2024 15:59
@fforbeck fforbeck force-pushed the feat/content-serve-auth branch from 8992687 to c09038b Compare December 16, 2024 16:12
@fforbeck fforbeck merged commit 6cbb202 into main Dec 19, 2024
18 checks passed
fforbeck pushed a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](capabilities-v1.1.2...capabilities-v1.2.0)
(2024-12-19)


### Features

* content serve authorization
([storacha#1590](https://github.com/storacha/upload-service/issues/1590)) + set
default gateway
([#99](#99))
([6cbb202](6cbb202))


### Other Changes

* **main:** release client 1.0.6
([27cb383](27cb383))
* **main:** release client 1.0.6
([#104](#104))
([07f27a2](07f27a2))
* **main:** release upload-api 1.1.8
([aec53e7](aec53e7))
* **main:** release upload-api 1.1.8
([#103](#103))
([e71494a](e71494a))

---
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>
fforbeck pushed a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](filecoin-api-v1.0.0...filecoin-api-v1.1.0)
(2024-12-19)


### Features

* content serve authorization
([storacha#1590](https://github.com/storacha/upload-service/issues/1590)) + set
default gateway
([#99](#99))
([6cbb202](6cbb202))


### Other Changes

* **main:** release client 1.0.6
([27cb383](27cb383))
* **main:** release client 1.0.6
([#104](#104))
([07f27a2](07f27a2))
* **main:** release upload-api 1.1.8
([aec53e7](aec53e7))
* **main:** release upload-api 1.1.8
([#103](#103))
([e71494a](e71494a))

---
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>
fforbeck added a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](upload-api-v1.1.8...upload-api-v1.2.0)
(2024-12-19)


### Features

* content serve authorization
([storacha#1590](https://github.com/storacha/upload-service/issues/1590)) + set
default gateway
([#99](#99))
([6cbb202](6cbb202))


### Other Changes

* **main:** release client 1.0.6
([27cb383](27cb383))
* **main:** release client 1.0.6
([#104](#104))
([07f27a2](07f27a2))
* **main:** release upload-api 1.1.8
([aec53e7](aec53e7))
* **main:** release upload-api 1.1.8
([#103](#103))
([e71494a](e71494a))

---
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>
Co-authored-by: Felipe Forbeck <[email protected]>
fforbeck pushed a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](client-v1.0.6...client-v1.1.0)
(2024-12-19)


### Features

* content serve authorization
([storacha#1590](https://github.com/storacha/upload-service/issues/1590)) + set
default gateway
([#99](#99))
([6cbb202](6cbb202))


### Other Changes

* **main:** release client 1.0.6
([27cb383](27cb383))
* **main:** release client 1.0.6
([#104](#104))
([07f27a2](07f27a2))
* **main:** release upload-api 1.1.8
([#103](#103))
([e71494a](e71494a))

---
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>
fforbeck added a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](cli-v1.0.1...cli-v1.1.0)
(2024-12-19)


### Features

* content serve authorization
([storacha#1590](https://github.com/storacha/upload-service/issues/1590)) + set
default gateway
([#99](#99))
([6cbb202](6cbb202))


### Other Changes

* **main:** release client 1.0.6
([27cb383](27cb383))
* **main:** release client 1.0.6
([#104](#104))
([07f27a2](07f27a2))
* **main:** release upload-api 1.1.8
([aec53e7](aec53e7))
* **main:** release upload-api 1.1.8
([#103](#103))
([e71494a](e71494a))

---
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>
Co-authored-by: Felipe Forbeck <[email protected]>
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.

Update the w3 CLI to create the new delegation when a new space is created
2 participants