-
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: access-api version route sets did=ucantoServerId and adds a signer prop #305
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
… which is the underlying did:key
gobengo
changed the title
access-api version route sets did=ucantoServerId and adds a signer prop
feat: access-api version route sets did=ucantoServerId and adds a signer prop
Dec 13, 2022
alanshaw
approved these changes
Dec 13, 2022
alanshaw
pushed a commit
that referenced
this pull request
Dec 14, 2022
🤖 I have created a release *beep* *boop* --- ## [4.1.0](access-api-v4.0.0...access-api-v4.1.0) (2022-12-14) ### Features * access-api version route sets did=ucantoServerId and adds a signer prop ([#305](#305)) ([5eab262](5eab262)) * embedded key resolution ([#312](#312)) ([4da91d5](4da91d5)) * include ucanto server principal did as 'aud' key in /version endpoint ([#309](#309)) ([bf3b171](bf3b171)) ### Bug Fixes * access-api ctx.signer no longer uses env.DID. instead env.DID is only used for ucanto server id ([#303](#303)) ([93d7003](93d7003)) * access-api wrangler.toml sets DID env var in env.dev ([#297](#297)) ([c4ca459](c4ca459)) * access-client/src/agent default PRINCIPAL is did:web:web3.storage ([#296](#296)) ([27f2f60](27f2f60)) * add support for did:web in the cli ([#301](#301)) ([885f7c1](885f7c1)) * fix client cli service did resolve ([#292](#292)) ([6be9608](6be9608)) * use did:web key in root handler ([#311](#311)) ([537dc48](537dc48)) --- 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: Alan Shaw <[email protected]>
gobengo
added a commit
that referenced
this pull request
Apr 11, 2023
…ner prop (#305) Motivation: * `@web3-storage/access` cli expects to be able to fetch /version and pull the `did` property in order to create the ucanto Verifier that is used as the `aud` when signing ucans * https://github.com/web3-storage/w3protocol/blob/main/packages/access-client/src/cli/utils.js#L28 * before this change, that `did` property came from `ctx.signer`, which will have a `did:key`. * but since #303 , the verifier used in the ucanto server for upload-api is actually different than `ctx.signer.did()`. So this PR makes it so /version `did` property actually comes from `ctx.config.ucantoServerId` * it also adds a new key to that endpoint, `signer`, which is the public key of the signer (which now can be different than the `DID` of the ucanto server id). I added this just in case someone wants to use the /version endpoint to know the undelrying signer pubkey
gobengo
pushed a commit
that referenced
this pull request
Apr 11, 2023
🤖 I have created a release *beep* *boop* --- ## [4.1.0](access-api-v4.0.0...access-api-v4.1.0) (2022-12-14) ### Features * access-api version route sets did=ucantoServerId and adds a signer prop ([#305](#305)) ([7452839](7452839)) * embedded key resolution ([#312](#312)) ([45f367d](45f367d)) * include ucanto server principal did as 'aud' key in /version endpoint ([#309](#309)) ([45e19ca](45e19ca)) ### Bug Fixes * access-api ctx.signer no longer uses env.DID. instead env.DID is only used for ucanto server id ([#303](#303)) ([1155998](1155998)) * access-api wrangler.toml sets DID env var in env.dev ([#297](#297)) ([7f4082f](7f4082f)) * access-client/src/agent default PRINCIPAL is did:web:web3.storage ([#296](#296)) ([1dd7217](1dd7217)) * add support for did:web in the cli ([#301](#301)) ([a1f9e85](a1f9e85)) * fix client cli service did resolve ([#292](#292)) ([45e7ad4](45e7ad4)) * use did:web key in root handler ([#311](#311)) ([d7bdade](d7bdade)) --- 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: Alan Shaw <[email protected]>
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.
Motivation:
@web3-storage/access
cli expects to be able to fetch /version and pull thedid
property in order to create the ucanto Verifier that is used as theaud
when signing ucansdid
property came fromctx.signer
, which will have adid:key
.ctx.signer.did()
. So this PR makes it so /versiondid
property actually comes fromctx.config.ucantoServerId
signer
, which is the public key of the signer (which now can be different than theDID
of the ucanto server id). I added this just in case someone wants to use the /version endpoint to know the undelrying signer pubkey