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

DOC: Verifiable Credential Data Integrity (VC-DI) Credentials in Aries Cloud Agent Python (ACA-Py) #2947 #3110

Merged
merged 11 commits into from
Jul 26, 2024

Conversation

kenechukwu-orjiene
Copy link

No description provided.

supersonicwisd1 and others added 8 commits April 13, 2024 11:35
Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
Copy link
Contributor

@PatStLouis PatStLouis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My 2 main comments are about the proof representation being incorrect, please use proofValue instead of jws per the Data Integrity sepcification.

The second has to do with using @vocab in the context. If one must do so it's recommended to use the https://www.w3.org/ns/credentials/examples/v2 url instead of inline vocab. However the pyld library doesn't support remote @vocab parsing so we have to do it inline. I would make it clear in the text that @vocab SHOULD NOT be used outside of demonstration/examples, and encourage implementers to define their own terms.

The vc-api endpoints are also available for these sort of demonstration.

Comment on lines +65 to +67
{
"@vocab": "https://www.w3.org/ns/credentials/issuer-dependent#"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would include note about avoiding @vocab outside of development and/or examples, and implementers should define their own terms in a context file they provide.

Copy link
Contributor

@PatStLouis PatStLouis Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this specific example, { "name": "https://schema.org/name" } instead of { "@vocab": "https://www.w3.org/ns/credentials/issuer-dependent#" } would also be a better solution to defining the attribute, however @vocab is fine for examples.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean something like this

..
"@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/security/data-integrity/v2",
    "@vocab": "https://www.w3.org/ns/credentials/issuer-dependent#"
    ]
 ..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, leave as is this will work, I would just put a note since using @vocab is considered a bad practice outside of demonstrations and development. Implementers are encouraged to write their own context or use community available contexts. The existing w3c documentation outlines this here:
https://github.com/hyperledger/aries-cloudagent-python/blob/main/docs/features/JsonLdCredentials.md#json-ld-context

2. **Select Credential type**
The ability to choose the credential type (indy, vc_di) to be issued. The credential type is used to determine the schema for the credential data.

The format to change credential can be seen in the ["Demo Instruction"](https://github.com/sarthakvijayvergiya/aries-cloudagent-python/blob/whatscookin/feat/vc-di-proof/docs/demo/README.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link should point to the aca-py github page, could this be a relative path?

Comment on lines 148 to 159
{
"auto_issue": true,
"auto_remove": false,
"comment": "Issuing a test credential",
"credential_preview": {
"@type": "https://didcomm.org/issue-credential/2.0/credential-preview",
"attributes": [
{"name": "name", "value": "John Doe"}
]
},
"trace": false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to include a filter for issue-credential 2.0?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one picking this out. I have included filter

"created": "2023-01-01T00:00:00Z",
"proofPurpose": "assertionMethod",
"verificationMethod": "did:key:z6MkqG......#z6MkqG......",
"jws": "eyJhbGciOiJFZERTQSJ9..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, jws is an invalid signature format here, it needs to be proofValue with a multibase representation of the signature.

"created": "2023-01-01T00:00:00Z",
"proofPurpose": "assertionMethod",
"verificationMethod": "did:key:z6MkqG......#z6MkqG......",
"jws": "eyJhbGciOiJFZERTQSJ9..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jws is not used in data integrity proofs, please use proofValue with a multibase representation of the proof:
https://w3c.github.io/vc-di-eddsa/#example-signed-credential-1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this have been updated

</details>

2. **Send the Verification Request:**
Use the `/verifier-credential/2.0/verify` endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this endpoint exists.

Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
Signed-off-by: supersonicwisd1 <supersonicwisdom@gmail.com>
@swcurran
Copy link
Member

Please update this PR to the latest so we can merge this. Thanks.

@ianco ianco requested a review from swcurran July 25, 2024 16:31
Copy link

sonarcloud bot commented Jul 25, 2024

@swcurran swcurran merged commit 194527a into hyperledger:main Jul 26, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

6 participants