4 ms·
"Signing Images with Docker Content Trust" explains how cryptographic container image signatures work w/ Docker Notary (TUF) https://docs.docker.com/engine/sec
by westurner 5y ago
"Signing Images with Docker Content Trust" explains how cryptographic container image signatures work w/ Docker Notary (TUF)
https://docs.docker.com/engine/security/trust/#signing-images-with-docker-content-trust https://docs.docker.com/engine/security/trust/#signing-image...
The TUF spec (and PyPI TUF PEPs) explains why a tar over https (with optional DNSSEC, a CA cert bundle, CRL, OCSP,) isn't sufficient for secure software distribution. "#ZeroTrust DevOps"; #DevSecOps
What's the favorite package format with content signatures, key distribution, a keyring of trusted (authorized) keys, and a cryptographically-signed manifest of per-file hashes, permissions, and extended file attributes? FWIW, ZIP at least does a CRC32.
We now have the Linux Foundation CNCF sigstore for any artifact, including OCI container images.
W3C ld-proofs is a newer web standard that unfortunately all package managers haven't yet migrated to. https://news.ycombinator.com/item?id=29355786 https://news.ycombinator.com/item?id=29355786
Because ld-proofs is RDF, it works in JSON-LD and you could merge the entire SBOM [1] and e.g. CodeMeta [2] Linked Data metadata for all of the standardized-metadata-documented components in a stack.
[1] https://github.com/google/osv/issues/55 https://github.com/google/osv/issues/55
[2] https://github.com/codemeta/codemeta https://github.com/codemeta/codemeta
- denysvitali 5y agoIsn't this reinventing the wheel somehow? Linux distros have been using tar.gz over HTTP (not S!) and relying on GPG for years.
- ibotty 5y agoBut most Linux distros are not that great either. They don't implement TUF and are not safe against some vectors prevented by that. It's OK to start anew when container distribution poses a different problem anyway. https://en.wikipedia.org/wiki/The_Update_Framework_(TUF) https://en.wikipedia.org/wiki/The_Update_Framework_(TUF)
- krageon 5y agoThe linked page doesn't explain anything at all. It says some incredibly obvious things (remotes can be compromised and you should be prepared for that) and then goes on to say the subject fixes all that, but there's actually no explanation of how it does that or what it does to get there. It's a marketing piece, essentially.
- westurner 5y agoFrom this about DNSSEC and software supply chain security a couple weeks ago, from this about Android packages: https://news.ycombinator.com/item?id=27700513 https://news.ycombinator.com/item?id=27700513 : >> [...] Sigstore is a free and open Linux Foundation service for asset signatures: https://sigstore.dev/what_is_sigstore/ https://sigstore.dev/what_is_sigstore/ >> The TUF Overview explains some of the risks of asset signature systems; key compromise, there's one key for everything that we all share and can't log the revocation of in a CT (Certificate Transparency) log distributed like a DLT, https://theupdateframework.io/overview/ https://theupdateframework.io/overview/ >> Certificate Transparency: https://en.wikipedia.org/wiki/Certificate_Transparency https://en.wikipedia.org/wiki/Certificate_Transparency >> Yeah, there's a channel to secure there at that layer of the software supply chain as well. >> "PEP 480 -- Surviving a Compromise of PyPI: End-to-end signing of packages" (2014-) https://www.python.org/dev/peps/pep-0480/ https://www.python.org/dev/peps/pep-0480/ >>> Proposed is an extension to PEP 458 that adds support for end-to-end signing and the maximum security model. End-to-end signing allows both PyPI and developers to sign for the distributions that are downloaded by clients. The minimum security model proposed by PEP 458 supports continuous delivery of distributions (because they are signed by online keys), but that model does not protect distributions in the event that PyPI is compromised. In the minimum security model, attackers who have compromised the signing keys stored on PyPI Infrastructure may sign for malicious distributions. The maximum security model, described in this PEP, retains the benefits of PEP 458 (e.g., immediate availability of distributions that are uploaded to PyPI), but additionally ensures that end-users are not at risk of installing forged software if PyPI is compromised. >> One W3C Linked Data way to handle https://schema.org/SoftwareApplication https://schema.org/SoftwareApplication ( https://codemeta.github.io/user-guide/ https://codemeta.github.io/user-guide/ ) cryptographic signatures of a JSON-LD manifest with per-file and whole package hashes would be with e.g. W3C ld-signatures/ld-proofs and W3C DID (Decentralized Identifiers) or x.509 certs in a CT log. > FWIU, the Fuschia team is building package signing on top of TUF. W3C Web Bundles + Linked Data for the SBOM and metadata could be a good solution for software supply chain security in general: https://news.ycombinator.com/item?id=29296573 https://news.ycombinator.com/item?id=29296573 : >> Web Bundles, more formally known as Bundled HTTP Exchanges, are part of the Web Packaging proposal. https://web.dev/web-bundles/ https://web.dev/web-bundles/ >> HTTP resources in a Web Bundle are indexed by request URLs, and can optionally come with signatures that vouch for the resources. Signatures allow browsers to understand and verify where each resource came from, and treats each as coming from its true origin. This is similar to how Signed HTTP Exchanges, a feature for signing a single HTTP resource, are handled.
- acidbaseextract 5y agoWut? I just make websites man. I don't want to be dismissive, but I hate deploying my applications for this reason. I'm an application developer. I'm not averse to infrastructure as code, and containerization, and I'm happy to do ops for my preferred stack. But I can't learn all this stuff too.
- andrewxdiamond 5y agoConveniently, Docker has abstracted 99% of what she said away from you.
- westurner 5y agoDoes `podman trust` also work yet? Shell commands from the first Docker docs link above: docker trust key generate jeff # docker trust key load key.pem --name jeff docker trust signer add --key cert.pem jeff registry.example.com/admin/demo docker trust sign registry.example.com/admin/demo:1 export DOCKER_CONTENT_TRUST=1 docker push registry.example.com/admin/demo:1 docker trust inspect --pretty registry.example.com/admin/demo:1 docker trust revoke registry.example.com/admin/demo:1