-
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!: content serve authorization #1590
Conversation
b98e723
to
5d8ba9b
Compare
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.
9984a07
to
7a395a9
Compare
e0fb6fb
to
d533b7a
Compare
d533b7a
to
5f414b0
Compare
@@ -13,13 +13,15 @@ export const provide = (ctx) => | |||
|
|||
/** | |||
* Checks if the given Principal is an Account. | |||
* |
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.
fixed lint issue
* @param {API.Principal} principal | ||
* @returns {principal is API.Principal<API.DID<'mailto'>>} | ||
*/ | ||
const isAccount = (principal) => principal.did().startsWith('did:mailto:') | ||
|
||
/** | ||
* Returns true when the delegation has a `ucan:*` capability. | ||
* |
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.
fixed lint issue
* @param {Agent<S>} agent | ||
* @param {Types.Invocation} invocation |
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.
fixed lint issue
990df46
to
8ab9792
Compare
🤖 I have created a release *beep* *boop* --- ## [18.0.0](capabilities-v17.4.1...capabilities-v18.0.0) (2024-12-05) ### ⚠ BREAKING CHANGES * content serve authorization ([#1590](#1590)) ### Features * content serve authorization ([#1590](#1590)) ([8b553a5](8b553a5)) ### Fixes * **egressRecord:** Remove unnecessary multiplication for ts conversion ([#1588](#1588)) ([b7bc90e](b7bc90e)) ### Other Changes * **main:** release w3up-client 16.4.1 ([#1577](#1577)) ([1482d69](1482d69)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [8.0.0](filecoin-api-v7.3.2...filecoin-api-v8.0.0) (2024-12-09) ### ⚠ BREAKING CHANGES * content serve authorization ([#1590](#1590)) ### Features * content serve authorization ([#1590](#1590)) ([8b553a5](8b553a5)) ### Other Changes * **main:** release w3up-client 16.4.1 ([#1577](#1577)) ([1482d69](1482d69)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [19.0.0](upload-api-v18.1.4...upload-api-v19.0.0) (2024-12-09) ### ⚠ BREAKING CHANGES * content serve authorization ([#1590](#1590)) ### Features * content serve authorization ([#1590](#1590)) ([8b553a5](8b553a5)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [17.0.0](w3up-client-v16.5.2...w3up-client-v17.0.0) (2024-12-09) ### ⚠ BREAKING CHANGES * content serve authorization ([#1590](#1590)) ### Features * content serve authorization ([#1590](#1590)) ([8b553a5](8b553a5)) --- 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>
Do you have any documentation / getting started example for this new behavior? |
Not yet @juliangruber . This functionality will align with other ongoing changes, like this issue. Once those are finalized, the documentation will be updated with all the necessary details to explain the new behavior. |
Got it, thanks. For now we shouldn't upgrade to that version, correct? |
That's correct. If you keep your |
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
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
Context
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 thecreateSpace
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.Main Changes
authorizeContentServe
, in thew3up-client
module to facilitate the delegation process. Integrated it with thecreatedSpace
flow.Related Issues
space/content/serve
Spaces by default project-tracking#158space/content/serve/*
delegations project-tracking#160