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

Clarify semantics between jwt claims and vc properties #226

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Conversation

decentralgabe
Copy link
Collaborator

@decentralgabe decentralgabe commented Jan 29, 2024

fix #205

open to feedback @msporny @selfissued


💥 Error: 502 Bad Gateway 💥

PR Preview failed to build. (Last tried on Feb 1, 2024, 8:58 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Spec Generator - Spec Generator is the web service used to build specs that rely on ReSpec.

🔗 Related URL

error code: 502

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

index.html Outdated Show resolved Hide resolved
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Copy link
Contributor

@David-Chadwick David-Chadwick left a comment

Choose a reason for hiding this comment

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

Whilst I agree with the sentiment of this PR, I do not think the current wording is clear enough

`issuer` with `iss`, `id` with `jti`, and `credentialSubject.id` with `sub`.
</p>
<p>
Implementers SHOULD avoid setting JWT claims to values that conflict with
Copy link
Contributor

Choose a reason for hiding this comment

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

SHOULD -> MUST
otherwise if an implementation does set conflicting values what does this mean?

Copy link
Member

Choose a reason for hiding this comment

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

It means that implementer (of Issuer and/or Holder/Presenter software) SHOULD understand that they're introducing inconsistencies to their data, and that downstream implementers (of Holder/Receiver and/or Verifier software) MAY reject such JWTs and their enclosed VCs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@David-Chadwick responding here. I agree with @TallTed's interpretation.

If @selfissued also believes this language is better as a MUST I will make a revision PR.

</p>
<p>
Implementers SHOULD avoid setting JWT claims to values that conflict with
verifiable credential properties, especially with pairs such as
Copy link
Contributor

Choose a reason for hiding this comment

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

verifiable credential properties when the claims and properties refer to the same concept, for example,

@decentralgabe decentralgabe merged commit f847794 into main Feb 12, 2024
2 checks passed
@decentralgabe decentralgabe deleted the issue-205 branch February 12, 2024 17:53
@iherman
Copy link
Member

iherman commented Feb 14, 2024

The issue was discussed in a meeting on 2024-02-14

  • no resolutions were taken
View the transcript

1.3. Add guidance around using JWK (pr vc-jose-cose#220)

See github pull request vc-jose-cose#220.

Gabe Cohen: One thing I forgot to mention -- there's some outstanding discussion around 220 ... around the JsonWebKey text that we should discuss to get clarity around some confusion that came up.
… This PR is clarifying language on the JsonWebKey spec on how to use the JsonWebKey type. There was discussion on a call a few weeks ago on whether we should add language on including properties like alg and kid and at first there was agreement to add back normative guidance on those properties.
… But then Mike and I agreed we didn't want to repeat language from another RFC -- and so we removed that. Ted said he wanted the language back.

Ted Thibodeau Jr.: the language that was removed was removed during misunderstanding of what was being discussed...point being the four words were added with intent and removed without that intent, which is why I've asked them to be re-added.

Manu Sporny: the language being modified is normative language that is significant. need to update the title of the PR, since it's broader than the example. somewhat confused...had said we'd have explicit guidance on iss, kid, etc. that guidance was not provided...may be a different issue. if we're talking about keys and just a JWT, and if we're just repeating what's said in the other spec we don't need to repeat it here. somewhat confusing...since kid matters.

See github pull request vc-jose-cose#226.

Gabe Cohen: The changes you're referring to Manu, went into 226. The changes we're talking about ... the PR is unfortunately named. The language I moved was originally in an example.
… The issue was to move it to normative guidance, outside of the example.
… The PR adds some guidance around using the JsonWebKey.

Ted Thibodeau Jr.: On Jan 18th, I said optional or required should be clearly stated for all properties, that's generally true what's happening but not true for the couple that were added with this PR.
… Those changes went in and were merged but then Mike said that some requirements were wrong.
alg is optional in JWKs -- and that's what I want put back.

Michael Jones: Are we talking about a change to header params or JWKs?

Gabe Cohen: JWKs.

Michael Jones: It's optional there, what does it say now?

Gabe Cohen: Nothing.

Michael Jones: It's fine to say that.
… This is one of the PRs I was trying to get a sense of ... is this one controversial or is that another one?

Gabe Cohen: It sounds like we're clear on this one, I'll apply Ted's suggestion and then we're good.
… The other has a rendering script problem.

Michael Jones: Ok, 220 should be ready once we get the suggestion in.

@David-Chadwick
Copy link
Contributor

@decentralgabe This PR was merged without addressing my requested editorial change.

Comment on lines +423 to +425
Implementers SHOULD avoid setting JWT claims to values that conflict with
verifiable credential properties, especially with pairs such as
`iss` and `issuer`, `jti` and `id`, and `sub` and `credentialSubject.id`.
Copy link
Member

Choose a reason for hiding this comment

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

@David-Chadwick — Answering your comment --

@decentralgabe This PR was merged without addressing my requested editorial change.

I think you're referring to this comment as your "requested editorial change".

Please note that your intent was not obvious because you did not submit it as a change request using the GitHub tooling, which would have shown the existing PR content in contrast to your suggestion, as you will see below, in my suggested massage of your suggestion:

Suggested change
Implementers SHOULD avoid setting JWT claims to values that conflict with
verifiable credential properties, especially with pairs such as
`iss` and `issuer`, `jti` and `id`, and `sub` and `credentialSubject.id`.
Implementers SHOULD avoid setting JWT claims to values that conflict with
the values of verifiable credential properties when a claim and property
pair refer to the same conceptual entity, especially with pairs such as
`iss` and `issuer`, `jti` and `id`, and `sub` and `credentialSubject.id`.
For example, JWK claim `iss` should not be set to a value which conflicts
with the value of verifiable credential property `issuer`.

I think a new PR (possibly starting with a new issue) will be needed to enact this (to my eyes, editorial) change, which I believe should only touch this paragraph.

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct. It is only this paragraph that needs changing. But note that the GitHub tooling did not work (again) otherwise I would have used it.

Copy link
Member

Choose a reason for hiding this comment

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

note that the GitHub tooling did not work (again) otherwise I would have used it

Maybe try manually using human language and Markdown formatting around your suggested changes, something like --

I suggest line 424 above --

verifiable credential properties, especially with pairs such as

-- be changed to the following --

verifiable credential properties when the claims and properties refer to the same concept, for example,

I've created issue #235 to track this going forward.

Copy link
Contributor

Choose a reason for hiding this comment

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

Many thanks

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.

Unclear semantics wrt. JWT claims vs. VC properties
5 participants