-
Notifications
You must be signed in to change notification settings - Fork 22
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(w3up-client): add default gateway authorization #1604
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
travis
requested changes
Dec 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question about this new DX and a suggestion that may or may not make sense!
travis
approved these changes
Dec 13, 2024
fforbeck
force-pushed
the
feat/default-gateway-auth
branch
2 times, most recently
from
December 16, 2024 13:43
455d219
to
1836f1f
Compare
fforbeck
force-pushed
the
feat/default-gateway-auth
branch
2 times, most recently
from
December 16, 2024 16:03
7b2a47d
to
870af09
Compare
fforbeck
force-pushed
the
feat/default-gateway-auth
branch
from
December 16, 2024 16:10
870af09
to
1a4a913
Compare
fforbeck
added a commit
to storacha/upload-service
that referenced
this pull request
Dec 19, 2024
…ay (#99) 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 - storacha/project-tracking#158 - storacha/project-tracking#160 - storacha/project-tracking#207 - storacha#1604 - Resolves storacha/project-tracking#196
fforbeck
pushed a commit
that referenced
this pull request
Dec 19, 2024
🤖 I have created a release *beep* *boop* --- ## [17.1.0](w3up-client-v17.0.0...w3up-client-v17.1.0) (2024-12-19) ### Features * **w3up-client:** add default gateway authorization ([#1604](#1604)) ([e669b55](e669b55)) ### Other Changes * **capabilities:** top level filecoin cap ([#1606](#1606)) ([22d0bf9](22d0bf9)) --- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
While updating the
web3-storage
docs,w3cli
, and@storacha/client
, I found it inconvenient to repeatedly define the gateway DID and URL every time I created a space. Also, if we don't provide theskipGatewayAuthorization=true
, it will throw an error saying it is required to provide the gateway services to authorize.Changes
Following @travis suggestion (see: storacha/docs#21 (comment)), I've updated the client to automatically authorize the Storacha Gateway (Production) by default if
skipGatewayAuthorization
is not set totrue
andauthorizeGatewayServices
is not provided or is empty.Once approved, this change will need to be ported to upload-service/w3up-client.
And the PR storacha/freeway#135 needs to be merged before this change gets released.