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

Add vcdm 2.0 model and context #3436

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

PatStLouis
Copy link
Contributor

Needs issuanceDate validation for vcdm 1.0 (add a current timestamp if absent)
Needs hooking up with didcomm

Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
@PatStLouis PatStLouis requested review from dbluhm and jamshale January 10, 2025 19:43
… date with vcdm 1.1

Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Copy link
Contributor

@ff137 ff137 left a comment

Choose a reason for hiding this comment

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

Just some early review comments

acapy_agent/vc/vc_ld/models/credential.py Outdated Show resolved Hide resolved
acapy_agent/messaging/valid.py Outdated Show resolved Hide resolved
acapy_agent/messaging/valid.py Outdated Show resolved Hide resolved
@@ -271,6 +274,12 @@ async def prepare_credential(
and SECURITY_CONTEXT_ED25519_2020_URL not in credential.context_urls
):
credential.add_context(SECURITY_CONTEXT_ED25519_2020_URL)
# Limit VCDM 2.0 with Ed25519Signature2020
elif (
options.proof_type == Ed25519Signature2018.signature_type
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps better to have options.proof_type != Ed25519Signature2020.signature_type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I disagree, maybe I should change the comment. We want to explicitly prevent the 2018 version, other types might be fine down the line. I mentioned 2020 because this is the only other current registered type, but the BLS2020 stuff would be okay as well.

The limitation of 2018 is because it was implicitly included in the vcdm 1.1 context, while 2020 has its own unique context url.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense. Soon after I commented, I thought that the best would be for there to be a list of supported signature types, and then the condition would just assert the requested type is in the list. That would allow the error message to indicate "please use one of the supported types: ", and can easily be expanded in the future

@dbluhm
Copy link
Contributor

dbluhm commented Jan 14, 2025

@PatStLouis I think it might be wise to get this "basic" support merged and then worry about integration with DIDComm ICv2 and PPv2 in a future PR.

@PatStLouis
Copy link
Contributor Author

@dbluhm I agree, I want at the minimum for the models not to break, since the didcomm protocols use the vc models

PatStLouis and others added 3 commits January 20, 2025 19:33
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
…s-cloudagent-python into vcdm-2.0-data-model-support
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
62.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
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.

3 participants