Commit Graph

109 Commits

Author SHA1 Message Date
Miloslav Trmač e67404a4ad INCOMPATIBLE: Remove the implementation of the ostree transport
Currently, ostree does not compile:

> ostree/ostree_dest.go:115:28: cannot use d (variable of type *ostreeImageDestination) as private.ImageDestinationInternalOnly value in argument to impl.AddCompat: *ostreeImageDestination does not implement private.ImageDestinationInternalOnly (missing method NoteOriginalOCIConfig) (typecheck)
> 	d.Compat = impl.AddCompat(d)

This has been broken since b941c6bf41 (Nov 18 2024, > 4 months).

Previously:
- 807381f448 (broken almost 4 months),
- 2e33bf7d27 (broken > 7 months)

Overall, it seems extremely likely that noone is using the
containers_image_ostree build tag (off by default since March 2019).

So, finally, give up, and delete the code. Most importantly, this allows us
to delete the > 3-year-old-frozen dependency, and risky CGo code.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-05-31 01:28:07 +02:00
Miloslav Trmač 67490aee1f Improve transport syntax documentation
The same thing is already said a few lines below.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-03-11 18:11:39 +01:00
Qi Wang a1af69ad90 policy.json BYOPKI signature verification API
Signed-off-by: Qi Wang <qiwan@redhat.com>
2025-02-19 10:03:59 -05:00
Miloslav Trmač 71e849a6b1 Add @sourceIndex syntax to oci/layout
Images in the index can now be referenced via the @sourceIndex syntax.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2025-01-06 11:14:57 +01:00
Miloslav Trmač 7bdb48b20c Support accepting multiple Rekor public keys
Add rekorPublicKeyPaths and rekorPublicKeyDatas , similar to the primary
root of trust public keys.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-08-20 17:02:03 +02:00
Dan Čermák 32d9aab3d6 Add field `KeyPaths` and `KeyDatas` to `prSigstoreSigned`
The new fields `KeyPaths` and `KeyDatas` is taken directly from
`/etc/containers/policy.json` and allows users to provide multiple signature
keys to be used to verify images. Only one of the keys has to verify, thereby
this mechanism allows us to have support seamless key rotation on a registry.

This fixes https://github.com/containers/image/issues/2319

Signed-off-by: Dan Čermák <dcermak@suse.com>
Co-authored-by: Danish Prakash <danish.prakash@suse.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-08-20 14:05:03 +02:00
Miloslav Trmač a170fe3280 Warn that docker-archive and oci-archive overwrite the whole file
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-06-28 22:30:24 +02:00
Kohei Tokunaga 6c1598a98f Add docs about additional-layer-store-auth-helper option
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-06-05 15:09:45 +02:00
Miloslav Trmač 1f66d1a1c1 Use digest.Parse() instead just a cast to digest.Digest
These cases should be safe because the data is either trusted
(ostree), or validated by an exact match later (signatures)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-05-14 01:01:29 +02:00
Miloslav Trmač 3a276e194a Fix font choices in containers-transports.5
Consistently:
- Literal strings are in `backticks`
- Variables are _italic in underscores_
- Syntax meta-characters []{} are neither

This does not really work well in section headings, but at least the
detailed descriptions should now be less misleading.

Fixes #2378.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-05-13 18:26:53 +02:00
Urvashi Mohnani 69d811fbca Add support for pushing image with unknown digest
Add support to push image with unknown digest and no tag to
a registry. This will be used by farm build to construct a list
of multi arch builds after pushing images built on each node.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-12-05 10:48:40 -05:00
Daniel J Walsh 2d2818f6b8
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-14 05:57:55 -04:00
Frederik Schwarzer 1c088bc47b Use consistent example domains
Signed-off-by: Frederik Schwarzer <schwarzer@kde.org>
2023-08-03 00:39:53 +02:00
Miloslav Trmač f63a54154d Clarify where mirrors are used
... trying to cover things like GetDigest / GetRepositoryTags /
SearchRegistry.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-07-28 19:30:42 +02:00
Miloslav Trmač 276a420ff2 Improve documentation of transport-specific scopes in containers-policy.json(5)
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-07-19 20:25:45 +02:00
Miloslav Trmač 0ac508f133 Improve containers-transports(5)
- Add missing sif:
- Add comments about intentionally-excluded atomic: and tarball:
- docker-archive: can now transparently handle non-seekable streams
- Clarify documentation of references in OCI transports

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-07-19 20:25:45 +02:00
Miloslav Trmač 5c1c3afb0a Clarify how names like oci🅰️b:c are parsed
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-06-21 20:20:17 +02:00
Miloslav Trmač fca26bf548 Clean up oci: and oci-archive: documentation a tiny bit
Also document the reference path in both.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-06-21 20:18:58 +02:00
Miloslav Trmač 76bc8c515b Improve containers-auth.json(5)
Remove repetitive descriptions; improve wording in various places.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-05-29 19:35:27 +02:00
Miloslav Trmač c2ea2dd458 /authentication/credential/g
"authentication" refers to a process, not to username:password;
"authentications" is not a thing.

So, use "credential" where appropriate, and make similar related adjustments.

Leave the existing public API of pkg/docker/config, and types.DockerAuthConfig,
unchanged, though.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-05-29 19:31:12 +02:00
delet0r cd68c1be79
Merge branch 'main' into docs_improvement 2023-03-20 10:24:50 +01:00
Lucas Humfeldt b3e0ba234e refactor(docs): Disambiguate sigstoreSigned documentation
From the current documentation, one could mistakenly assume, that
`use-sigstore-attachments` needs to be enabled by the registry and not
in the client. This commit rephrases the part of the documentation to
make it more clear, that this needs to be done on the client side.

Signed-off-by: Lucas Humfeldt <lucas@humfeldt.de>
2023-03-20 10:23:59 +01:00
Miloslav Trmač 6691c33c7f Don't claim auth.json contains encrypted information
... to decrease the risk that users might think it doesn't need
protecting.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-03-13 22:06:07 +01:00
Miloslav Trmač c670744110 Make it clear that cleartext signatures are not accepted in simple signing
The current implementation transparently accepts them in gpgmeSigningMechanism ,
but openpgpSigningMechanism rejects them; so make it clear that they should
be rejected.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-17 02:25:51 +01:00
Daniel J Walsh 30568e81f8
Run codespell on codebase
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-09 09:12:11 -05:00
Miloslav Trmač 23774f5123 Add support for Fulcio and Rekor to sigstoreSigned
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-21 22:03:36 +01:00
Miloslav Trmač 9e3177f44c Add pkg/cli/sigstore
Introduce a "sigstore signing parameter file" that can carry all the required
configuration, so that we don't need to add 9 different CLI options.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-13 17:41:54 +01:00
Miloslav Trmač 142ac62e41 Clarify the semantics of the optional.creator field in simple signature payload
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-12-08 21:16:37 +01:00
Sam Morris 14be7020e7 Fix unordered list formatting in containers-policy.json(5)
Signed-off-by: Sam Morris <sam@robots.org.uk>
2022-11-22 09:36:30 +00:00
Tomas Volf 58f840462c
Document limitations of transports for remote podman client
When using remote podman client, not all transports work as expected. So
document this limitation.

Fixes: containers/podman#15141
Signed-off-by: Tomas Volf <tomas.volf@showmax.com>
2022-08-30 10:50:46 +02:00
Miloslav Trmač f1870f5de5 Use .pub extension for public keys in sigstoreSigned examples
Hopefully users understand public/private keys enough not
to distribute the private ones, but let's minimize opportunities
for making that mistake.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-19 18:23:00 +02:00
Miloslav Trmač ac5d515f3e Point out use-sigstore-registries in sigstoreSigned documentation
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-19 18:21:26 +02:00
Miloslav Trmač d218ff3d46 Allow accepting multiple GPG keyrings via signedBy.keyPaths
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-13 16:34:30 +02:00
Miloslav Trmač 53cc8d2682 Tone down the example language a bit
Prefer being descriptive to a value judgement.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-12 13:11:30 +02:00
Miloslav Trmač df1b3a7d24 Refer to sigstore instead of cosign in most places
Note that this involves an incompatible signature binary format change.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-12 13:11:29 +02:00
Miloslav Trmač 3766acbf59 Add lookaside and lookaside-staging, hide sigstore and sigstore-staging
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-11 22:05:13 +02:00
Miloslav Trmač 64756915ba Add Cosign verification support
type: cosignSigned, with the usual keyData/keyPath.
Fulcio/Rekor is not currently implemented.

NOTE: This only allows a single public key, not a keyring,
unlike simple signing. That seems problematic, there are
known users of that. But we can fix that later by adding
keyDirectory and the like.

NOTE: Cosign interoperability requires use of
signedIdentity: matchRepository. The fairly useful
signedIdentity: remapIdentity has no repository-match
functionality.

NOTE: Multi-arch images need to be signed by cosign
with --recursive to be accepted; c/image enforces
signatures per platform.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-08 18:38:45 +02:00
Miloslav Trmač 69adefae4b Fix JSON syntax in the policy.json(5) man page
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-07 18:38:00 +02:00
Miloslav Trmač 4efefd6d9d Add use-cosign-attachments to registries.d/*.yaml
... so that users can choose whether to do the extra
manifest lookups, and record signatures.

NOTE: This defaults to false.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-07 14:53:14 +02:00
Daniel J Walsh 409cc66a7c
Fix codespell errors
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-25 06:18:36 -04:00
Miloslav Trmač d8b67984d8 Use correct list syntax in containers-registries.conf(5)
Four leading spaces are interpreted by go-md2man as a code block.

Add a new line to start a new paragraph, so that go-md2man recognizes
the list syntax.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-22 17:45:09 +02:00
Valentin Rothberg 297ee4e43b man containers-registries.conf: clarify mirror association
Clarify that a `[[registry.mirror]]` is associated only with the
previous `[[registry]]`.

Fixes: #1523
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-22 09:04:01 +02:00
Qi Wang 0642df250f Add pull-from-mirror for adding per-mirror level restrictions
Close: https://github.com/containers/image/issues/1407
Add pull-from-mirror: all, digest-only, tag-only for adding per-mirror level restrictions
to image pull through mirrors.

The `mirror-by-digest-only` for primary is still allowed configuring,
and it is honored for compatibility

Signed-off-by: Qi Wang <qiwan@redhat.com>
2022-03-30 13:56:20 -04:00
Valentin Rothberg c828ec77f6 registries.conf: fix typo in prefix
The dot in a `*.` prefix is mandatory.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-28 10:48:47 +02:00
Valentin Rothberg f93baa51d7 registries.conf: prefixes: subdomain matching
Mention that wildcarded prefixes match an arbitrary number of
subdomains.

Closes: #1397
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-25 09:14:15 +01:00
svdHero 5431f38dce Adds hint about default config and removes obsolete markdown escaping
Signed-off-by: Joerg Baeuerle <joerg.baeuerle@gmx.net>
2022-01-18 13:16:01 +01:00
Reinhard Tartler d2c7b0b752 [CI:DOCS] Misc manpage fixups
Found by the Debian Lintian tool, this avoids some nroff warnings
in the generated manpages and allows proper whatis/apropos indexing.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2021-10-06 15:42:53 -04:00
Miloslav Trmač 58a95db29d Fix documentation of oci: and oci-archive:
Fixes confusion reported in https://github.com/containers/podman/issues/11553 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-09-14 10:58:28 +02:00
Daniel J Walsh d695b98f83
Merge pull request #1288 from saschagrunert/login-logout-tests
Support updating registry credentials scoped to namespaces/repos
2021-07-16 13:04:44 -04:00
Valentin Rothberg fede54a737 docs: containers-registries.conf.5.md
Drop "along as mentioned above" in the description of wildcards.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-14 11:01:02 +02:00