-
Notifications
You must be signed in to change notification settings - Fork 18
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
Extending DSSE Signatures #59
Comments
My vote is for Option 2. |
I'm also in favor of option 2. That said, for both options it would be nice if we could get at least one more concrete example (other than Sigstore Also for option (2), I suggest tweaking the example to use the type Optionally that message could also be copied in for clarity, but I think in general we wouldn't necessarily expect the message definition for every possible type that might exist to be present in DSSE's reference proto schema. |
My vote is for option 2, I think we need to add support for multiple extensions. I took a first attempt at creating a RFC for the extensions we would need for ITE-7 and ITE-10 in in-toto @patricklawsongoogle |
@colek42 Thanks for the quick response! So that RFC runs right into one of the high level topics in the discussion we had around option (2), namely: should There are basically two very different ways we can imagine using those extensions, and I feel like they're mutually incompatible: (2a). It's a repeated field, and extensions are intended to be composed together if multiple bits of unauthenticated data are needed (e.g. a cert chain and a timestamp, independently). This is what's done in #60 right now. (2b). It's a singular field, and the extension type is intended to be an opinionated, self-contained composition of whatever fields it needs. This is what's proposed in (2) right now. There's plenty of room to argue that (2a) would also work. I tend to favor (2b) because it makes it clear that the fields of a given extension all belong together and might have some internal relationships or invariants that need to be checked by a verifier. With (2a), the extra dimension that we add feels like it's going to create opportunities for confusion. For example, if both a So I'm personally in favor of (2b), where there is at most one extension per signature, and that extension is self-contained and presumably has a proto (or equivalent) schema defined with documentation about the semantics of the fields and any relationships between them. If there is a need for one signature to include multiple independent extensions (which seems unlikely), then there is little harm in just repeating the signature with the other extension. That said, I could definitely be convinced that a bucket of independent extensions is better (or necessary), especially if the underlying extensions come with some sort of documented guarantee of being strictly independent from any other extensions and only related (at most) to the payload and top level signature. Concrete examples comparing these approaches would help a lot. For example, here's a strawman of how #60 might look with (2b):
Or, of course, perhaps Sigstore's |
|
@colek42 Sounds good to me. Re (2): does |
+1 on option 2. One question is how we should handle duplication of the signature if the extension also includes the signature, which is would for sigstore. Should the spec be opinionated on if the signature is populated in both the top level and the extension, and in that case, is there any validation that should be done to check they match, or should the client be instructed to ignore the top level one? |
Do you mean if there are two identical signatures, possibly even with same keyid, except one has an extension, and the other one doesn't? |
Some thoughts... In many cases the verifier is going to need the data in the extension to verify. If the user is using ephemeral certs they will need to have a way to prove the time of the signature. If the data is in the extension it should use it, however, I think the verfier should still be allowed to retrieve verification material from other sources. If there is two identical signatures that verify we should only count it once to the threshold count. If they are both different and verify they should both count to the threshold count. For example, in Witness Policy (and ITE-7), we made the decision not to include the full cert chain. The cert chain is only complete when we cbine the attestation with the policy. |
I think the issue mentioned is that there is a Lukas made a maybe relevant SigstoreSigner for experimental TUF use in securesystemslib. There we copied the signature bytes from the verification material bundle so that the TUF signature container would have a "signature" in it, but that value is purely cosmetic: verification only uses the verification material bundle that is added as an extension (much like option 2 here). |
Oh, I see, I understand now: I think Hayden means what if the extension itself contains a redundant copy of the signature. Yeah, at the very least, I'd imagine you'd check that the two copies match, but each extension could specify things differently, so best to leave it to each extension to specify what to do (definitely a foot gun here, but I don't see a better alternative right now). |
BTW, let me repeat an idea I've mentioned elsewhere: in applications such as in-toto and TUF, which feature secure key distribution, you could cryptographically bind the extension to a key such that you know to expect exactly this extension and nothing else when you try to verify its signature. |
@haydentherapper perhaps I'm mistaken but are you thinking of using |
If an extension already includes a signature and the top level I think making |
This should be true in general, right? Any given authentication policy that needs some extension to authenticate should have that requirement encoded alongside the trust anchors used to verify signatures. Or by "cryptographically bind the extension to a key" do you mean something in addition to the authentication policy? |
@adityasaky Yea, using |
Yes, I think we're on the same page. Specifically in TUF and in-toto, we can specify the required extension inside of public keys. |
Opened #61 to add support for extensions to the spec. |
I just realized I never put my opinion in this bug. Personally I think Option 1 is simpler. I don't understand the listed "Cons" to option 1. The |
An interesting Q @jkjell raised is how verifiers should verify different signatures with different extension types. |
+1 for option 2 and what is proposed in #61 |
The added metadata is for each signature, so I think each signature can be verified independently using its extension? It does depend on the support the verifier has for each extension used. |
cc @MarkLodato @trishankatdatadog @patricklawsongoogle @haydentherapper @mnm678 @TomHennen
Today, a DSSE signature has two fields: the compulsory
sig
field and the optionalkeyid
field. DSSE does not support embedding signature-specific information (though this has been discussed in #39 and related issues) such as certificate bundles and timestamps. Broadly speaking, there are two ways to add support for such information to the DSSE specification.Option 1: Adding generic fields
In this option, we add generic support for optional fields. One for certificate bundles (see #50), another for timestamp (see #33) and so on. A signing ecosystem that requires a certificate bundle would use the corresponding generic field.
Pros
Cons
Option 2: Supporting ecosystem specific extensions
In this approach, a DSSE signature can be extended with ecosystem specific fields with context-specific definitions. An extension field for sigstore, for example, would have a field for the certificate bundle, another for the Rekor entry ID, and perhaps one to indicate the sigstore instance used. These fields would accompany the default signature fields.
Pros
Cons
The text was updated successfully, but these errors were encountered: