Skip to content

Update credentialStatus checks. - #170

Merged
aljones15 merged 1 commit into
vc-2.0-time-propsfrom
optional-status-id
Jan 10, 2024
Merged

aljones15 merged 1 commit into
vc-2.0-time-propsfrom
optional-status-id

Conversation

@davidlehn

Copy link
Copy Markdown
Member
  • Make "id" optional.
  • If "id" present, check it's a URL.
  • Add tests.

This matches 1.x spec, and is currently an open issue in 2.0 work.

- Make "id" optional.
- If "id" present, check it's a URL.
- Add tests.
Comment thread test/10-verify.spec.js
.contain('"credentialStatus.id" must be a URI');
});

it('should accept "credentialStatus" with no "id"', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this 1.0 or 2.0? in 2.0 I'm showing: https://w3c.github.io/vc-data-model/#status

credentialStatus
If present, the value of the credentialStatus property MUST include the following:
id property, which MUST be a URL which MAY be dereferenced.
type property, which expresses the credential status type.

so it should not accept a credentialStatus with no id. @davidlehn

@aljones15 aljones15 Jan 4, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also checked and in 1.1 credentialStatus.id must be a url and present:

https://www.w3.org/TR/vc-data-model/#status

credentialStatus
If present, the value of the credentialStatus property MUST include the following:
id property, which MUST be a URI.
type property, which expresses the credential status type (also referred to as the credential status method). It is expected that the value will provide enough information to determine the current status of the credential and that machine readable information needs to be retrievable from the URI. For example, the object could contain a link to an external document noting whether or not the credential is suspended or revoked.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to summarize: in vc 2.0 credential status id is becoming optional because specs that define credential status(es) don't necessarily want to make information like id available. So in the higher level spec (VC 2.0) id will become optional and then depending on the credential status spec id will be required or not.

@davidlehn

Copy link
Copy Markdown
Member Author

w3c/vc-data-model#1398

@aljones15

Copy link
Copy Markdown
Contributor

@dlongley @davidlehn just to make sure we want credentialStatus id to be optional in 1.0, 1.1, and 2.0? I know we want it optional in 2.0, but just making sure.

@davidlehn

Copy link
Copy Markdown
Member Author

There is a status type spec that says it's optional, 1.0 and 1.1 say id MUST be included, and 2.0 is making id optional. This seems like an oversight in 1.x specs more than something that should be enforced. I'm not sure what to say for testing in this situation. Perhaps ideally it would be tested as optional, and errata would be written for 1.0 and 1.1 to clarify the issue for implementations. That takes a bit of work though. In any case, leave some comments near the tests so people understand the issue.

@aljones15

aljones15 commented Jan 10, 2024 •

Copy link
Copy Markdown
Contributor

There is a status type spec that says it's optional, 1.0 and 1.1 say id MUST be included, and 2.0 is making id optional. This seems like an oversight in 1.x specs more than something that should be enforced. I'm not sure what to say for testing in this situation. Perhaps ideally it would be tested as optional, and errata would be written for 1.0 and 1.1 to clarify the issue for implementations. That takes a bit of work though. In any case, leave some comments near the tests so people understand the issue.

so the question is, as the vc 2.0 branch still supports VC 1.0 issuance/verification etc, is should we check the context of the VC and then have an optional check if 2.0 and a required check if 1.0 for credentialStatus.id?

@dlongley

Copy link
Copy Markdown
Member

@aljones15,

This library should not require credentialStatus.id no matter which version of the VC is being used. It's not helpful to throw on that and the 1.0/1.1 spec text is probably in error and contradicts actual credential status specs.

@aljones15
aljones15 merged commit a962210 into vc-2.0-time-props Jan 10, 2024
@aljones15
aljones15 deleted the optional-status-id branch January 10, 2024 23:10
@aljones15

Copy link
Copy Markdown
Contributor

PR merged @BigBlueHat be advised this PR has received new functionality: #168

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