-
Notifications
You must be signed in to change notification settings - Fork 13
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
Detached payloads can be used #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The WG needs to discuss this. This would be the first time we're doing a fully detached payload for a VC, with no reference to the detached payload anywhere in the signed information. The use case isn't clear, and it seems like a dangerous thing to do (you're just signing something and then not giving any guidance on where that thing lives or how to use it in a protocol).
I'm fine with the working group discussing it, but the underlying facts of the situation are that both JWS and COSE support detached payloads. Therefore, this PR is editorial, in that it doesn't change the normative meaning of the specification or add any functionality that didn't already exist. What it does do is remove any ambiguity that may be in people's minds about this functionality already existing and being usable with Verifiable Credentials. As for security, there's nothing less secure about signing detached content than attached content. In both cases, you continue processing the input only if the signature validates. |
The issue was discussed in a meeting on 2024-08-21
View the transcript5. Detached payloads can be used (pr vc-jose-cose#292)See github pull request vc-jose-cose#292. Gabe Cohen: It came to my attention that there's a PR in JOSE-COSE that we should discuss. Michael Jones: Ambiguity around using detached signatures. If we do nothing, we can use detached signatures. That said, readers would be better served for us to repeat what's in the underlying specifications. It's not normative, because it doesn't change the meaning of the spec. Manu Sporny: The reason this surprised me is because I don't think we use detached signatures anywhere else in the ecosystem. Michael Jones: I also answered the security question in the issue that it's no less secure than including it in the payload, because if it doesn't validate, detached or not, we can't proceed. How do we associate the payload with the container? We don't do protocols, and that's a protocol feature. Joe Andrieu: In the way that we're using the detached payload, what's going over the wire has a media type of application/vc, but because it's detached, it's not going with the payload. What do we call that thing that's securing that data, that is not a VC? Ivan Herman: Without going technical, it's a procedural thing. My understanding is that the fact of having the detached signature is something that the standard allows. Michael Jones: That's correct, and likewise COSE defines the mechanism for detached signature. Manu Sporny: I haven't yet heard a use case where we need to use detached signatures. It's really hard to analyze the usefulness until we have them. I have concerns, because in our COSE examples, we're going to be showing how to secure things, and we will be showing detached signatures, but we don't have a media type for it and we don't know how to.
Manu Sporny: There are a number of questions. We shouldn't put a number of examples if the group isn't using it. Others can use it and other mechanisms, but we don't have examples in the spec because we haven't got concrete use cases. Michael Jones: This PR doesn't change the examples, nor am I proposing to do so. One of the technical reasons in JOSE for using detached signatures is that you can use the unencoded payload option, which means you never have to Base64 encode the payload. If you have an authenticated way to transmit the payload between parties, that's outside the scope of what we specify. We get the size savings of not doing the encoding. That is a use case.
Manu Sporny: I would be find with us staying silent on it. Someone out there that is implementing this would be good to hear from. Gabe Cohen: We do use detached payloads. We haven't explored COSE yet, but will ask my team. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since JOSE and COSE support detached payloads it makes sense to me that this spec should support them too
noting it may be worth it to add guidance on when it would be appropriate to leveraged detached payloads. tagging @mistermoe to speak to our usage of detached payloads at TBD.
After speaking with @mistermoe, I can reaffirm our usage of detached payloads. In our project, tbDEX, our signatures currently make use of detached JWS.
In addition to the reason given in the docs, we find efficiencies storing detached signatures in our databases. We are able to store the payload data in queryable text, while maintaining the signature. As necessary, we're able to reconstruct the detached payload and verify the signature. This is preferable to storing the data twice (in plaintext and base64). We have not yet explored adopting COSE; however, it's a topic of interest within the team, to provide additional space savings. That said, we would like to see this specification support detached payloads for both JOSE and COSE. |
The issue was discussed in a meeting on 2024-09-27
View the transcript2.3. Detached payloads can be used (pr vc-jose-cose#292)See github pull request vc-jose-cose#292. Brent Zundel: PR raised by selfissued, comments by decentralgabe,. Gabe Cohen: spec was unclear about detached payloads, this PR adds that language,. Michael Jones: as discussed in the issue, the jwt spec and the cose spec permit detached payloads and we are using them normatively, if we do nothing they are allowed, if we merge this PR it doesn't change the meaning but it does explicitly say detached payloads are allowed. Manu Sporny: this came about because the default example changed, will note that I oppose this because it's the first time we're talking about using detached payloads for VCs.
Manu Sporny: concerned about hexadecimal signature in example, would rather follow the same format as other examples. Gabe Cohen: feel like there was regression in code, example should show full payload, it may be useful to show examples for attached and detached. Manu Sporny: concerned about detached payloads were viewed negatively and used as an example of the group not knowing what it is doing. Brent Zundel: proposal is to close this PR now, raise another one where the examples are only attached payloads. Manu Sporny: clear up the example to show full payloads. Michael Jones: if we close the PR we should close the issue. Brent Zundel: but you are not disagreeing. Michael Jones: yes.
Brent Zundel: anyone who would disagree about closing this PR and issue? |
As per the TPAC discussion, we are closing this as 'won't fix'. Detached payloads are possible, and we do not need language around them. |
Fixes #278
Also updated the SD-JWT terminology to use the term "JWT Claims Set", which the SD-JWT spec now does.
Preview | Diff