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

access service & client should use did:web:web3.storage #237

Closed
3 of 5 tasks
Tracked by #97
gobengo opened this issue Dec 1, 2022 · 5 comments
Closed
3 of 5 tasks
Tracked by #97

access service & client should use did:web:web3.storage #237

gobengo opened this issue Dec 1, 2022 · 5 comments
Assignees
Milestone

Comments

@gobengo
Copy link
Contributor

gobengo commented Dec 1, 2022

Motivation:

Parts

@gobengo gobengo self-assigned this Dec 1, 2022
@hugomrdias hugomrdias added this to the w3up phase 1 milestone Dec 2, 2022
@hugomrdias
Copy link
Contributor

is this the same #182 ? can we add this to the track issue ?

@gobengo
Copy link
Contributor Author

gobengo commented Dec 2, 2022

@hugomrdias it's part of that, but just the part for access-client and access-api. that ticket is for 'all the services' afaict.

can we add this to the track issue ?

sure idc. I put it in the equivalent milestone so it appears in the gh project board

gobengo added a commit that referenced this issue Dec 2, 2022
Motivation:
* part of #237
* we need this version of ucanto libs because they include updated types
to handle non-key-dids and dids with more than one key

Parts
* [x] build/test works in packages/access-client
* [x] build/test works in packages/upload-client
* [x] [blocked by needed ucanto
release](storacha/ucanto#163)
* [x] build/test works in packages/access-api
* [x] [blocked by needed ucanto
release](storacha/ucanto#163)

Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
@hugomrdias
Copy link
Contributor

why did:web instead of did:dns ? @gobengo @Gozala

@gobengo
Copy link
Contributor Author

gobengo commented Dec 8, 2022

why did:web instead of did:dns ? @gobengo @Gozala

@hugomrdias only prior discussion was here.

In short, it's because did:web is easier to implement and try things out with.

  • implementable using only a web server, which access-api and upload-api already are
    • did:dns impl would beg question of how to manage the dns rules, which depends on how we operate our dns server and whether we outsource it e.g. to cloudflare or route53
  • did:web spec is maintained by members of w3c ccg, which is a group we can go to for advice while implementing. did:dns spec maintained by one company atm (even though it's a rad company :P).
  • Things I'm avoiding on purpose in did:dns
    • this TODO gives me pause
    • dns rule resolution is eventually consistent and did:webfetch isn't
    • did:dns vulnerable to spoofs without DNSSec, and I didn't want to bite off DNSSec support unless we really need to
  • Most importantly, if did:web starts feeling like a bad choice, we can stop using it and try anything else.

gobengo added a commit that referenced this issue Dec 12, 2022
…r id (#275)

Motivation:
* #237

Notes
* This is intended to be safe to merge/deploy as is. The new
functionality can be opted-into via env vars
* The ucanto server will only be constructed with an opts.id that is a
signer `withDID(...)` iff `process.env.DID` is set to a DID
* If `process.env.DID` is unset, the ucanto server id signer will have a
`did()` corresponding to `config.PRIVATE_KEY` (it will be a `did:key` of
the corresponding public key)
* Before this PR, many tests of the access-api worker were configured
implicitly via dotenv with whatever the `/.env.local` file happened to
contain. I added a worker test that asserts functionality that is
dependent on the details of the env vars, so I made an affordance for
[tests to be able to configure the access-api worker with environment
variables defined in the test case
itself](https://github.com/web3-storage/w3protocol/pull/275/files#diff-e20ffc550d006747790e7b67da280446c1cd1d2d4f72ccb5df04f62cbb6423daR149).
@heyjay44 heyjay44 mentioned this issue Dec 14, 2022
51 tasks
@gobengo
Copy link
Contributor Author

gobengo commented Dec 15, 2022

I think this is done now :)
Screenshot 2022-12-14 at 4 39 53 PM

@gobengo gobengo closed this as completed Dec 15, 2022
gobengo added a commit that referenced this issue Apr 11, 2023
Motivation:
* part of #237
* we need this version of ucanto libs because they include updated types
to handle non-key-dids and dids with more than one key

Parts
* [x] build/test works in packages/access-client
* [x] build/test works in packages/upload-client
* [x] [blocked by needed ucanto
release](storacha/ucanto#163)
* [x] build/test works in packages/access-api
* [x] [blocked by needed ucanto
release](storacha/ucanto#163)

Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
gobengo added a commit that referenced this issue Apr 11, 2023
…r id (#275)

Motivation:
* #237

Notes
* This is intended to be safe to merge/deploy as is. The new
functionality can be opted-into via env vars
* The ucanto server will only be constructed with an opts.id that is a
signer `withDID(...)` iff `process.env.DID` is set to a DID
* If `process.env.DID` is unset, the ucanto server id signer will have a
`did()` corresponding to `config.PRIVATE_KEY` (it will be a `did:key` of
the corresponding public key)
* Before this PR, many tests of the access-api worker were configured
implicitly via dotenv with whatever the `/.env.local` file happened to
contain. I added a worker test that asserts functionality that is
dependent on the details of the env vars, so I made an affordance for
[tests to be able to configure the access-api worker with environment
variables defined in the test case
itself](https://github.com/web3-storage/w3protocol/pull/275/files#diff-e20ffc550d006747790e7b67da280446c1cd1d2d4f72ccb5df04f62cbb6423daR149).
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

2 participants