Skip to content

How to prevent a Verifier from acting as an unauthorised Holder #203

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

Closed
David-Chadwick opened this issue Jul 19, 2018 · 12 comments
Closed
Assignees

Comments

@David-Chadwick
Copy link
Contributor

Say a holder (who may or may not be the subject) sends a VC to a Verifier that it trusts to use the VC for a particular purpose, and puts a limitation in the Terms of Use of the Verifiable Presentation to this effect, then what is to stop an untrustworthy Verifier from stripping off the Verifiable Presentation and then presenting the VC to another verifier, wrapped in a new Verifiable Presentation, asserting that it (the first verifier) is the rightful holder who is allowed to present this VC to the second verifier?

Terms of Use in the verifiable presentation do not protect against this.

Terms of Use in the issued VC could protect against this, but this would necessarily restrict how the holder could use or present the VC. For example, SAML introduced an audience restriction into the issued SAML assertion to limit the target/verifiers who are authorised to receive the assertion, but this on its own is not sufficient for our situation, as the second verifier may be within the set specified by the audience restriction. So there is a tension between:
a) allowing the holder the flexibility to present the VC to any verifier, and
b) stopping the first verifier from re-presenting the VC to a second verifier, whilst
c) allowing a VC to be chained between processes e.g. in a supply chain, where the end verifier is given proof of who the subject is.

I do not think we currently have any text that covers this issue.

@msporny
Copy link
Member

msporny commented Jul 19, 2018

What is to stop an untrustworthy Verifier from stripping off the Verifiable Presentation and then presenting the VC to another verifier, wrapped in a new Verifiable Presentation, asserting that it (the first verifier) is the rightful holder who is allowed to present this VC to the second verifier?

The verification software that Digital Bazaar is writing expects the DID specified for verifiableCredential.claim.id to be associated with verifiablePresentation.proof.creator (i.e. subject is holder). If it is not, the linkage between the Verifiable Credential and the holder must be established in some other way. If the linkage can't be established, and the establishing the linkage is important for the use case, the verification process would fail (because the verifier has no idea if the holder should have that particular credential).

You are correct in that we don't really go into details about this use case, but there is a way to use the existing values in the data model to prevent this from happening.

As for supporting the use case of "delegating credentials"... that's something that I haven't seen a compelling solution for yet. I expect that the solution may have to do with a certain type of verifiable credential that asserts the delegation of a credential to a different subject. I'm thinking through a solution wrt. that currently... still a bit fuzzy on some of the attack vectors if we enable this... working through those.

@dlongley
Copy link
Contributor

dlongley commented Jul 19, 2018

As for supporting the use case of "delegating credentials"... that's something that I haven't seen a compelling solution for yet. I expect that the solution may have to do with a certain type of verifiable credential that asserts the delegation of a credential to a different subject.

I don't think "delegation" of a VC makes any logical sense. A VC is a statement of identity about a subject. How do you "delegate" that? Delegation is the act of granting authority (that one already has) to another party. What authority you have is determined by the verifier, not the issuer (the one making statements about identity).

With the existing data model anyone can already say anything about anyone else. No one needs to be delegated that authority. Rather, there are use cases where you need a chain of trust. For example, where a verifier receives a transcript from a student from university X -- but the verifier does not know university X. However, a system can be engineered such that the verifier can dereference university X's identifier and find a document with another VC (or that leads to it via another protocol) that states that the university has been accredited by board Y and the verifier does trust board Y. We should support this (and do, I believe), but this is not "delegation", it is chain of trust.

What we haven't done is specify any protocols around this ... because we're not chartered to do so. We could potentially write some non-normative examples, though.

"Delegation" is the in the realm of authorization and there is another spec the CCG is working on for that -- OCAP-LD.

@agropper
Copy link

agropper commented Jul 19, 2018 via email

@David-Chadwick
Copy link
Contributor Author

@dlongley "What authority you have is determined by the verifier, not the issuer (the one making statements about identity)".

This is not always the case. There are plenty of VC examples where the issuer is authorising you and granting you certain rights. First, every case where the issuer and the verifier are the same authority, the issuer typically determines what rights you have. For example, when roles are assigned in organisations, the issuer determines the role you have, and the verifiers that are typically distributed throughout the organisation, honor this by giving you access to their various resources.
Secondly, when I get a driving licence, the issuer gives me authority to drive a car. A policeman, the verifier, honours this. The verifier does not authorise me to drive a car.
Thirdly, electronic prescriptions, issued by a doctor, authorise me to collect drugs from a pharmacy. The pharmacy verifier has no authority to change the prescription or stop me accessing the drugs. Furthermore I can go to any pharmacy. Who the verifier is, is largely unimportant.
I could go on, but I hope you agree the point.

@David-Chadwick
Copy link
Contributor Author

@agropper. I agree that a prescription can be a VC (see my comment above). I also agree that the holder may not be the subject, and therefore the pharmacy needs to know if the holder is authorised to present the prescription (and it is not some drug addict who has stolen it from the patient). Knowing that the holder is authorised could be via a variety of mechanisms, for example:

i) the subject delegates to a relative or friend using one of the mechanisms described in the delegation section of Subject NE Holder

ii) the issuer (doctor) could give the prescription VC directly to the relative, say if the patient is bedridden, and uses the mechanism described in the section "Holder Acts on Behalf of Subject"

iii) The holder could physically present him/herself to the pharmacist and show other credentials (not necessarily electronic ones) to prove they are acting on behalf of the subject (patient). This is outside the scope of the current data model.

@stonematt
Copy link
Contributor

Is this strictly related to the scope of Data Model? This discussion seems to invoke protocol type details that we shouldn't be trying to solve at this point.

@David-Chadwick
Copy link
Contributor Author

@stonematt We already include protocol related content in both the VC and VP, for example, Terms of Use, which states what a verifier is expected to do when receiving the VC/VP. I guess we have two choices:
a) strip everything from the existing data model that relates to protocol and passing VCs and VPs between different entities, or
b) continue as we have been doing, and show how the data model can be used to control the transfer and use of VCs and VPs between the different entities.
This issues assumes we have chosen path b), and indicates where we still have a void in our document.

@stonematt
Copy link
Contributor

stonematt commented Aug 15, 2018

@David-Chadwick @dlongley I agree that there are elements of the data model spec that support the protocol work. But this seems to go beyond that. An issue like this could very well be identified in the issue tracker or in the specification as a problem that the protocol will solve. This is particularly true since we decided to defer the delegation discussion.

@stonematt
Copy link
Contributor

Need to fix the title to represent this discussion

@burnburn burnburn removed the defer label Oct 26, 2018
@burnburn
Copy link
Contributor

From TPAC 2018:

  • JoeA and DavidC need to discuss.
  • Verify that title is accurate.

@brentzundel
Copy link
Member

brentzundel commented Mar 4, 2019

Decision at Barcelona F2F:

  • Not CR-Blocker: Mention in implementation guidance that it’s protocol related or and is addressed in another issue
  • @ashimura will move repo to w3c
  • @dmitrizagidulin - Close after opening issue for this in implementation guidance repo.

@dmitrizagidulin
Copy link
Contributor

Issue opened on the impl. guide - w3c/vc-imp-guide#2

This issue here can be closed.

@burnburn burnburn closed this as completed Mar 7, 2019
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

No branches or pull requests

8 participants