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 "proofValue" to LinkedDataProof. #250

Merged
merged 1 commit into from
Dec 4, 2021
Merged

Conversation

peacekeeper
Copy link
Member

Addresses #194.

@peacekeeper
Copy link
Member Author

^ @vdods

Comment on lines +34 to +36
proofValue:
type: string
description: Value of the Linked Data proof.
Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm, we might want cryptosuite-specific limitations here:

https://github.com/digitalbazaar/ed25519-signature-2020-context/blob/master/contexts/ed25519-signature-2020-v1.jsonld

... but that results in an endless schema upgrade cycle. What we're doing right now isn't as tight as some security professionals would want (but you'd expect the cryptosuite to catch the really terrible things). So, we're probably going to have to make a decision soon about this -- is this schema fairly loose, or do we want the schema to be exceedingly restrictive. My suggestion is the latter, and if we do that, we're going to have to figure out how to not make this a burden on the API (and to enable easy extensibility for these cryptosuite schemas).

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree it's not ideal, but I think adding this fixes a bug in the current schema. I'm not enough of an OpenAPI wizard to know if it's possible to allow/disallow certain properties depending on the value of another property ("type"). Maybe the "oneOf" keyword could be used here somehow.

Ideally, the cryptosuite specs, JSON-LD contexts, and OpenAPI schemas should all match.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, the cryptosuite specs, JSON-LD contexts, and OpenAPI schemas should all match.

Yes, agreed... hope we can find some way to automate this. One way would be to leverage some mythical LDI Cryptosuite Registry in the future and pull in the schemas from there. I believe the traceability folks have already something like this working in their test suite?

Copy link
Contributor

@msporny msporny left a comment

Choose a reason for hiding this comment

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

I'm fine w/ this going in for now, but we're definitely going to have to revisit it as we march towards a standard.

@mkhraisha
Copy link
Collaborator

I think we may need to split the LinkedDataProof object depending on if it is in the context of a Presentation or a VC, I'm not 100% sure but I can't think of a reason for a VC to have challenge/domain fields for example

@msporny
Copy link
Contributor

msporny commented Dec 4, 2021

Normative, at least one review by an Editor, no objections, it's been 22 days, merging.

@msporny msporny merged commit 1e7d71e into main Dec 4, 2021
@msporny msporny deleted the peacekeeper-ldp-proofvalue branch December 4, 2021 19:12
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