-
Notifications
You must be signed in to change notification settings - Fork 2
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: Support DID accreditations [DEV-4415] #601
base: develop
Are you sure you want to change the base?
Conversation
DaevMithran
commented
Sep 23, 2024
•
edited
Loading
edited
- accredit/issue api
- accredit/verify api
- Add relevant tests
Task linked: DEV-4415 Start on implementations |
6f1ceab
to
2522d16
Compare
9c61a7e
to
4f58f29
Compare
0c44623
to
0186b87
Compare
fe4146d
to
82f0385
Compare
a205d34
to
d2d2018
Compare
fa5d838
to
9d693c2
Compare
c8adad8
to
bb4d8c5
Compare
bb4d8c5
to
24529ef
Compare
158668d
to
cb2be30
Compare
cb2be30
to
81b80a7
Compare
7fbef86
to
7f979c4
Compare
6d5caae
to
14377ca
Compare
0958a9b
to
c96b540
Compare
c96b540
to
de4c2a4
Compare
e15c2ef
to
6ae1669
Compare
eventTracker.emit('track', trackInfo); | ||
|
||
return response.status(StatusCodes.OK).json({ | ||
didUrls: [ |
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.
Would be helpful to receive suggestions on the response schema
Currently it is
- didUrls: [ didUrlwithPathparam, didUrlwithQueryParam ]
- accreditation: the vc jwt
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.
For the query param version, is the name of the accreditation escaped correctly in case it has characters like spaces? Does it even allow spaces?
Yes @ankurdotb spaces are allowed, the query params are parsed by the express router
What happens if the credential issuance part is successful, but creating the resource fails?
We return a 500
public async verify(request: Request, response: Response) { | ||
// Extract did from params | ||
let { verifyStatus = false, allowDeactivatedDid = false } = request.query as VerifyCredentialRequestQuery; | ||
const { accreditation, policies, subjectDid } = request.body; |
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.
Here accreditation in request body is a didUrl.
Can I just receive it as did, resourceName, resourceType or resourceId separately?
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.
Could you deconstruct a DID URL to those parts? We do something similar on Creds API, IIRC.
eventTracker.emit('track', trackInfo); | ||
|
||
return response.status(StatusCodes.OK).json({ | ||
didUrls: [ |
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.
For the query param version, is the name of the accreditation escaped correctly in case it has characters like spaces? Does it even allow spaces?
Yes @ankurdotb spaces are allowed, the query params are parsed by the express router
What happens if the credential issuance part is successful, but creating the resource fails?
We return a 500
* connector: | ||
* type: string | ||
* enum: | ||
* - verida | ||
* - resource |
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.
Verida won't be an allowed connector for this, will it?
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.
@ankurdotb we still haven't removed verida connector from our code entirely, we just disabled it. Should I remove it?
* - issuerDid | ||
* - subjectDid | ||
* - schemas | ||
* example: |
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.
Bad example?
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.
Why is this test being skipped?
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.
I am going to debug this in a separate PR. JSONLD issuance using Jsonwebkey 2020 is failing
"accreditationName": "accreditAccreditation", | ||
"parentAccreditation": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain", | ||
"rootAuthorization": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain" |
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.
Seems like same DID as parent and root. Can we do at least two different levels?
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.
@ankurdotb it is done it the attestation test. At one point there should be a single level when the parent is root
9982c7a
to
7d274f5
Compare
7d274f5
to
8696023
Compare