Commit Graph

17 Commits

Author SHA1 Message Date
Derek McGowan 8f67ad5859 Update go module to imgcrypt v2
Allow importing of containerd v2 without breaking compatibility for
use with containerd v1.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-24 07:06:14 -07:00
Derek McGowan 8b9b205467 Update to containerd v2.0.0-rc.2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-26 17:27:03 -07:00
Akihiro Suda 27550399fb
go.mod: github.com/containerd/containerd/v2 v2.0.0-rc.1
- github.com/containerd/containerd/{containers,images,...} -> github.com/containerd/containerd/v2/core/{containers,images,...}
- github.com/containerd/containerd/{errdefs,logs,platforms} -> github.com/containerd/{errdefs,logs,platforms}
- github.com/containerd/typeurl -> github.com/containerd/typeurl/v2
- github.com/urfave/cli -> github.com/urfave/cli/v2 (See containerd/containerd PR 9809)
- github.com/gogo/protobuf -> github.com/containerd/containerd/v2/protobuf

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-25 12:01:20 +09:00
Stefan Berger 9e8e1c1df3 ctr: Sync code with containerd v1.6.23 ctr
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-08-15 10:28:46 -04:00
Stefan Berger 0f2559e3c9 ctr: Sync code with containerd v1.6.20 ctr
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-08-15 08:36:11 -04:00
Kazuyoshi Kato 6eaeb4a586 Add build tags to make gofmt happy
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-20 17:04:13 +00:00
Akihiro Suda fe5e256b4c
Decouple CreateCryptoConfig() from github.com/urfave/cli
Decouple `CreateCryptoConfig()` from `github.com/urfave/cli`, so that it
can be called from other applications that do not use `github.com/urfave/cli`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-10-29 15:10:23 +09:00
zounengren 967ee1fc62 replace pkg/errors and bump related library
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-22 17:23:25 -04:00
Stefan Berger 5c4f3ee7f4 Sync ctr-enc with containerd's ctr v1.5.0-rc.3
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-05-07 20:32:42 -04:00
Stefan Berger 3723f9c1c9 Apply gofmt on run.go
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-10-21 13:40:43 -04:00
Stefan Berger f8581ead31 pkcs11: Update to latest ocicrypt and roll back some changes
Update to the latest ocicrypt and adjust the code accordingly. Ocicrypt
now gets the user-provided configuration for pkcs11 only if a pkcs11 key
in yaml format is provided. This avoids unnecessary error messages if for
example an image is pulled but doesn't need pkcs11 configuration since
no keys are needed since it doesn't need to be decrypted. Also, the helper
functions ending in 'WithOpts' do not exist anymore and so we roll back some
of the previous changes.

Also, due to the changes, the config file is searched for in this order:
- ${OCICRYPT_CONFIG}="internal": use an internal allow-all policy
- ${OCICRYPT_CONFIG}
- ${XDG_CONFIG_HOME}/ocicrypt.conf
- ${HOME}/.config/ocicrypt.conf
- /etc/ocicrypt.conf

The previously used IMGCRYPT_CONFIG variable is not used anymore.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-10-20 07:21:10 -04:00
Stefan Berger d95ea7ae27 Add pkcs11 support
Extend the parse_helpers with pkcs11 support.

We introduce a configuration file from which pkcs11 parameters are read. A config file
may look like this:

pkcs11:
  module-directories:
    - /usr/lib64/pkcs11/
  allowed-module-paths:
    - /usr/lib64/pkcs11/libsofthsm2.so

The module-directories enumerates directories in which to look for pkcs11 modules.
The allowed-module-paths restricts the pkcs11 modules that can be used.

The config file is searched for in this order:
- ${IMGCRYPT_CONF}
- ${XDG_CONFIG_HOME}/imgcrypt.conf
- ${HOME}/.config/imgcrypt.conf
- /etc/imgcrypt.conf

If no config file can be found then an internal default configuration is used.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-09-29 10:37:31 -04:00
Brandon Lum bdd59ce7dc Implement decryption-keys-path capabilities to use local keys
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-01-06 09:07:53 +00:00
Brandon Lum 3234bf723a Refactor options in images/encryption/client
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-11-13 20:49:03 -05:00
Stefan Berger cb61fda0fc Use mediatypes from ocicrypt and use latest containerd
The mediatype we used before was only experimental:

   application/vnd.docker.image.rootfs.diff.tar.gzip+enc

The newer one is

   application/vnd.oci.image.layer.v1.tar+gzip+enc

Update to latest containerd and adjust code to it.

We need to update the mediatypes being used by GetImageLayerDescriptors,
so we move the function into our own directory.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-09-27 16:48:07 -04:00
Stefan Berger d6f18aac9e ctr: gofmt file
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-08-13 16:52:39 -04:00
Stefan Berger 10a5b9b05d Create a ctr derivative with image crypto support
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-08-08 16:58:27 -04:00