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

Some questions about implementation: URIs and verificationMethod #945

Closed
fabrii opened this issue Oct 11, 2022 · 6 comments
Closed

Some questions about implementation: URIs and verificationMethod #945

fabrii opened this issue Oct 11, 2022 · 6 comments
Labels

Comments

@fabrii
Copy link

fabrii commented Oct 11, 2022

Hi! I don't know if this is the proper place for this kind of question. If it isn't please let me know.

I have some questions related to the implementation of the W3C Verificable Credentials Model.
There are many attributes of a VC that can be described as URIs. Some containing an external URI or just a plain ID. For example: credential id, issuer, verification method. Throughout the post I will make some statements, and I would really appreciate if you could tell me if I am right or wrong.

Issuer

The value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if dereferenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.

Option a) "issuer": "https://example.edu/issuers/14"

In this case, the issuer is a URL that can be exposed by the central registry. In my case this could be something like https://registryA/api/issuers/14. What happens if in the future the url changes, and now the service is exposed in "registryB"? If im not wrong, this cannot be changed, since the credentials already issued would point to a non-existent issuer. This is similar to the @context url. Once it is defined, cannot be changed.

Option b) "issuer": {
"id": "14",
"name": "Example University"
}

In this case, the issuer is identified by a plain ID. The verifier should know the base url of the registry beforehand if wants to know more about the issuer. The verifiers can know the central registry urls so this is reasonable. I believe it has a bit more flexibility, as the base url can change. On the other way, if the base url of the registry is the same used to expose the @context, it cannot be changed, so the benefit is lost.

Credential ID

The value of the id property MUST be a single URI. It is RECOMMENDED that the URI in the id be one which, if dereferenced, results in a document containing machine-readable information about the id.

a) "id": "http://example.edu/credentials/3732"

In this case, the credential URL must be exposed by the issuer, and not by the central registry. It makes no sense for the identifier to be a plain id since the verifiers have no way of knowing the url (as the issuers can be many). This base URL has to be fixed, and cannot change (same as issuer option A).

verificationMethod

The verificationMethod property specifies, for example, the public key that can be used to verify the digital signature. Dereferencing a public key URL reveals information about the controller of the key, which can be checked against the issuer of the credential.

a) "verificationMethod": "did: key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"

The did:key method should be used by Wallets (for example when signing verifiable presentations). In this case, the subject (did:key) is going to be the same as the verificationMethod. Wallets should have only one key, so it is a good approach.

b) "verificationMethod": "https://example.edu/issuers/565049#key-1"

In this case, the verificationMethod is a URL that can be exposed by the central registry. In my case this could be something like https://registry/api/issuers/14/keys/1. Again, this URL is fixed and cannot change in the future.
I'm trying to understand the benefits of this URL approach differs from the did:key method. I have read that it might be related to the fact that issuers can have many keys, and they must support key rotation, in comparison to wallets that dont need it.

Thank you!

@brentzundel
Copy link
Member

The working repository for the Verifiable Credentials Data Model is elsewhere. I will transfer this issue to that repository.

@brentzundel brentzundel transferred this issue from w3c/verifiable-credentials Oct 11, 2022
@TallTed

This comment was marked as resolved.

@OR13
Copy link
Contributor

OR13 commented Jan 25, 2023

Seems related to several other open issues:

See also, DIDs vs DID URLs

and controller vs verificationMethod.

in did core:

https://www.w3.org/TR/did-core/

@OR13
Copy link
Contributor

OR13 commented Jan 25, 2023

Let us know if these answer the questions you have, and if we can close this issue.

@fabrii
Copy link
Author

fabrii commented Jan 27, 2023

Hi @OR13. The links do not answer the questions/statements provided above (or may be I dont understand them).

@OR13
Copy link
Contributor

OR13 commented Jan 31, 2023

It seems like you might be asking implementation / vendor specific questions here.

In general identifier need to dereference to documents.... How that happens for HTTP, DIDs, Data Integrity Proofs or JWTs is not really a focus on this repository or the core data model.

I suggest reviewing interop test suites, such as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants