Commit Graph

29 Commits

Author SHA1 Message Date
Derek McGowan 0abc1115d3 Update test to pull all bash platforms
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-26 21:40:13 -07:00
Akihiro Suda ae8d059087
script/tests/test_encryption.sh: debug
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-25 11:59:58 +09:00
Akihiro Suda 964f4c40ab
script/tests/test_encryption.sh: show log
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-25 11:59:55 +09:00
Akihiro Suda 04e37ceefe
typo: disable_plugins -> disabled_plugins
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-27 23:35:42 +09:00
Stefan Berger f37a4d8871 test: Add 2 more RSA keys with 'alg' explicitly set
Besides the existing key with no 'alg' set, add 2 more RSA keys have
'alg' set to RSA-OAEP and RSA-OAEP-256. All of these are synonymous for
each other, meaning they use SHA256 and MGF1.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-03-13 10:49:39 -04:00
Stefan Berger e31dd549a4 test: Add a test with JWK EC key(P-521, ECDH-ES+A128KW)
Duplicate existing test with RSA key and use it for testing with EC key.

Key created on website: https://mkjwk.org/

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-03-13 10:14:52 -04:00
Stefan Berger 286470a956 test: Test creating and running of container with key file missing
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-06-15 21:23:54 -04:00
Stefan Berger 0512869879
Merge pull request #115 from stefanberger/stefanberger/test_fixes
Fix some issues in the test script
2023-06-15 19:21:27 -04:00
Stefan Berger aa517cc776 test: Fix order of parameters and remove unnecessary key parameter
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-06-15 19:07:13 -04:00
Stefan Berger ec7231185e test: Add comments to test case
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-06-15 15:46:49 -04:00
Stefan Berger 2959ec0ec4 test: To be able to run testLocalKeys alone add missing env variable
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-06-15 15:46:49 -04:00
Stefan Berger 8fc037fd2d tests: Upgrade toml written by test case to version 2
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-03-29 19:02:54 -04:00
Stefan Berger 06da359b73 Add support for zstd type of compressed layers
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Resolves: https://github.com/containerd/imgcrypt/issues/95
2022-10-07 12:24:22 -04:00
Stefan Berger 67b7b5dd3b tests: Add -traditional to OpenSSL command line when OSSL v3 is used
OpenSSL 3 did not maintain backwards compatibility with the key format
when for example RSA keys with passwords are created and in this case
one has to add -traditional to the command line to get the key in the
old format.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-09-18 16:34:19 -04:00
Stefan Berger f4400580b6 test: Test running of encrypted image only pulled for local platform
Create a reproducing test case for issue #69 by adding a test case
with a bash image that is only pulled for the local platform, so
without --all-platforms. The test case will likey work on amd64 but
does fail locally on a ppc64 host.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2022-03-21 09:52:07 -04:00
Brandon Lum 97185d475c Add imgcrypt test with invalid keyprovider path
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2021-03-08 16:06:44 -05:00
Stefan Berger cd3ea33c1b test: Add test for keyprovider using KEYPROVIDER variable for executable
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-01-25 18:22:13 -05:00
Stefan Berger 13165f5c88 tests: Allow passing pull credentials using IMAGE_PULL_CREDS
To avoid errors when pulling images from docker hub, allow passing
pull credentials using IMAGE_PULL_CREDS.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-01-06 12:18:30 -05:00
Stefan Berger 71a8421dcd build-sys: Run gofmt -d in 'make check'
Signed-off-by: Stefan Berger <stefan@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 4bf34a40b8 Extend test script with PKCS11 test case and adjust Travis config file
Extend the test script with a PKCS11 test case and adjust the Travis
config file to also install softhsm2, which require bionic for our needs.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-09-29 10:37:31 -04:00
Stefan Berger 45c6ffc45f tests: Renew expired GPG keys
The testkey1 and testkey2 had expired, so create some new ones lasting
10 years.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-09-22 13:38:32 -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
Rui Chen 6dbde9bd5e
Update installation of runc
Signed-off-by: Rui Chen <chenrui333@gmail.com>
2020-01-05 23:57:58 -05:00
Stefan Berger ae432af8b6 Update the Makefile and add install and uninstall targets
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-10-01 13:04:01 -04:00
Brandon Lum 5529bb6329 Updated ocicrypt library
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-09-30 13:54:24 -04: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 a210b93298 tests: Adapt config file's stream processor part to new format
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-09-19 16:49:28 -04:00
Stefan Berger 5fd67673d2 Travis: Run ctr encryption test script
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-08-08 18:09:12 -04:00