-
Notifications
You must be signed in to change notification settings - Fork 664
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
Define structure of signatures in OCI #400
Comments
On Wed, Oct 19, 2016 at 02:38:42PM -0700, Stephen Day wrote:
Can we just focus on (1) here then? These discussions are complicated My personal position on the signing scope is that folks should be Where the name being asserted lives doesn't really matter 1. You a. In a generic named-assertion media type with its own blob (like The (small) differences between the approaches are:
|
@wking As was expected, my point is completely lost to you. Again, this is not a naming or format discussion. We need to choose the signing targets. Please refrain from commenting on this issue further before consulting with the maintainers. We must keep this focused and in scope or no progress will be made. |
Intuitively, users who use signing are likely to refer to an image using a name, and are going to assume that the image retrieved is actually signed and named by one of the configured trusted signers. For this reason, I suggest that the signature has to cover the image name (including the ref tag) and one of the content-hashes. I think it's reasonable to make an exception for the ref tag In particular, I want to be sure that it isn't possible for an attacker to substitute the signed but old-and-vulnerable I'm saying nothing about how the image is discovered or how the name is resolved or structured, or where signers come from. |
On Sat, Oct 22, 2016 at 10:07:59PM -0700, Adrian Colley wrote:
I'm pretty sure we want to have the signatures and signed objects in CAS, since that makes them easy to mirror and distribute. #176 proposes structures for doing that, although you can keep the name information in other places too if you don't want a separate name-assertion blob. You don't want to sign the ref (because the ref is mutable data that lives outside of CAS), but a name-assertion is a lot like ref that has moved into CAS (it's just a |
On Sat, Oct 22, 2016 at 10:07:59PM -0700, Adrian Colley wrote:
IPFS addresses this by providing a number of validity schemes. I expect we'll want something similar here, but “valid forever” assertions (with no additional validation data like validity-range, time-to-live, or parent) seem like a good place to start. Once we agree on that, we can come back in a subsequent round and add more granular validity schemes. |
The signature format that @mtrmac and others have implemented against is proposed as a specification here: https://github.com/containers/image/pull/59/files. Example: {
"critical": {
"identity": {
"docker-reference": "docker.io/library/busybox"
},
"image": {
"docker-manifest-digest": "sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
},
"type": "atomic container signature"
},
"optional": {
"creator": "atomic 0.1.0-dev",
"timestamp": 1471035347
}
} Before quibbling about specific details (data structure, values, etc), does this make sense at a high level? |
@aweiteka Just two quibbles. The JSON you quoted describes itself as a signature; but it's actually a document which is signed, and the signature is stored elsewhere. The PR you linked to proposes encrypting the document as well as signing it, which makes no sense. Other than those, and ignoring the details of how the JSON might be integrated into OCI and how keys might be discovered, it makes sense to me. |
@aweiteka As I outlined in this issue, this cannot be a format discussion. If I'm understanding you're proposal, it seems like you want agreement on the scope of a signing statement. Before we do this, the first agreement needs to be made on a potential signing target. This needs to be one of the existing formats, perhaps a manifest or manifest list. Then we can talk about the scope of the statement made by the signature. I've separated out an action on this issue that can help to address the confusion. |
On Mon, Oct 24, 2016 at 12:10:39PM -0700, Stephen Day wrote:
I think there are useful workflows around signing configs manifests, and manifest-lists (although there are pros and cons to each choice). I'm happy to go over my arguments again, but it might be more productive if folks who think there is a single reasonable choice pitch their case for that choice. |
Maybe it's a matter of terminology, but I don't see any difference between the target of a signature and the scope of the signature. Either way, it is the thing whose integrity is protected against undetected malicious change. The manifest and manifest list are both fine targets, as is the descriptor: all of them contain a content-hash which can secure the rest of the download by a client. I don't think the image config will do because it doesn't have hashes for the compressed layers. Clients need the length of each layer file before downloading so they can't be attacked with large files to provoke memory exhaustion, something the descriptor spec protects against quite well. There's obvious value in allowing different signers for different manifests referenced by the same manifest list. So that's my suggestion: manifests should be signed. |
On Mon, Oct 24, 2016 at 01:42:37PM -0700, Adrian Colley wrote:
But it does have diffIDs, so the trade-off is potential gzip-bomb exposure vs. not having to re-sign after layer re-compression. |
On Mon, Oct 24, 2016 at 01:42:37PM -0700, Adrian Colley wrote:
And an unsigned manifest-list opens manifest-list consumers up to denial-of-service type attacks where a malicious intermediate puts bogus entries into the manifest-list for a given platform. An attacker could also spoof some platform settings ( |
@aecolley While the target infers scope, we already have hash-stable data structures that make a very nice target for signing. When deciding on the target, we are saying that a signature should include the hash of that target. When we talk about scope, we are referring to the semantics of the statement. This includes a superset of what is asserted in the signing target. At minimum, we can make the strong statement that manifest So, this discussion must first decide on what |
On Mon, Oct 24, 2016 at 08:18:27PM -0700, Stephen Day wrote:
I think “blob X is signed by Y” is pretty useless unless it's clear what that signature is asserting. In the absence of an explicit assertion, I expect it is “everything in the Merkle tree rooted at X is perfect” which seems like a high bar to meet. There are a number of more restricted assertions we could focus on, and I think “the name of blob X is Z” is a reasonable starting point. Once we work out the name-assertion framework, we can come back and consider additional assertions (e.g. “has been audited for security with a report at URL Z”) in future issues.
Do you not see enough benefit in the layer-re-compression-agnostic config signatures to consider supporting signed name-assertions on them?
I suggest postponing this until we've settled on an initial assertion S (e.g. “the name of blob X is Z”) and a set of valid target types (e.g. “any type you like” or “just manifests and manifest-lists”). |
Manifest annotations can be used for any security assertions that we'd like the signature to represent. I'd prefer to be able to sign any element of the set { It is least work (and least overhead) to sign refs; but it is maximum flexibility to sign manifests, because different keys can be used by different organizational units with responsibility for different architectures. Actually, who does that? The simplicity of signed refs is starting to appeal to me. 😐 As for signature storage, it's sufficient to use detached |
On Tue, Oct 25, 2016 at 05:05:17PM -0700, Adrian Colley wrote:
This assumes that the original signers remain involved in ongoing Of course, config-level signatures mean that less-well-intentioned
You can't actually do that, because you need a serialized byte-stream
Signatures can already live in image-spec's blobs directory, which
I think we should punt on signature discovery until we pick at least
This email may be signed or encrypted with GnuPG (http://www.gnupg.org). |
On Wed, Oct 26, 2016 at 08:47:00AM -0700, W. Trevor King wrote:
More than a week with no “I don't think we have a consensus yet”, so |
Good history here, but any signature format discussions that are on going can open new issues as needed |
For signatures to work and be compatible across implementations, we need to define two aspects:
Number 1 must come before number 2 or we risk a vertically integrated, incompatible mess.
To be clear, this will not be successful if this becomes a file-format discussion, as that won't solve the problem. We need to define the framework within which these formats can operate.
TL; DR We need to define an interface to the signing world.
Context: #22 (comment)
Actions:
The text was updated successfully, but these errors were encountered: