Skip to content

Clear decrypted layers cache more agressively in local keys tests#215

Merged
stefanberger merged 3 commits into
containerd:mainfrom
stefanberger:pkcs11-fix
Jul 7, 2026
Merged

Clear decrypted layers cache more agressively in local keys tests#215
stefanberger merged 3 commits into
containerd:mainfrom
stefanberger:pkcs11-fix

Conversation

@stefanberger

Copy link
Copy Markdown
Contributor

Refactor the code to implement new remove_all_snapshots function and use it to aggressively clear the layer cache. It shows that the pkcs11 local keys test did not actually decrypt the layers when creating a container but it relied on cached layers instead. An updated version of the ocicrypt library is therefore needed.

Set the environment variable OCICRYPT_CONFIG=internal when starting
containerd so that the ctd-decoder tool knows which PKCS11 config
to use when started from containerd.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Add calls to remove_all_snaphots in local keys tests to avoid decrypted
layers caching effects. This now requires an update of the ocicrypt
library for the test to work since previously cached layers were used
and no actual decryption was done when pkcs11 was used.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
@stefanberger stefanberger merged commit b6aeb69 into containerd:main Jul 7, 2026
8 checks passed
@stefanberger stefanberger deleted the pkcs11-fix branch July 7, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant