Skip to content

[23.0 backport] use ad-hoc libtrust trustkey #44566

Merged
thaJeztah merged 5 commits intomoby:23.0from
thaJeztah:23.0_backport_remove_trustkey_id_migration
Dec 8, 2022
Merged

[23.0 backport] use ad-hoc libtrust trustkey #44566
thaJeztah merged 5 commits intomoby:23.0from
thaJeztah:23.0_backport_remove_trustkey_id_migration

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah added this to the 23.0.0 milestone Dec 1, 2022
@thaJeztah thaJeztah changed the title [23.0 backport] use ad-hoc libtrust key [23.0 backport] use ad-hoc libtrust trustkey Dec 1, 2022
@thaJeztah
Copy link
Copy Markdown
Member Author

Interesting failure; looks unrelated, but haven't seen this before;

> [containerd-alt-15 1/1] RUN --mount=from=containerd-src,src=/usr/src/containerd,readwrite --mount=target=/root/.cache,type=cache   git fetch origin   && git checkout -q "v1.5.11"   && make bin/containerd   && make bin/containerd-shim-runc-v2   && mv bin /out:
#47 5.604 + bin/containerd
#47 329.7 # github.com/containerd/containerd/vendor/github.com/miekg/pkcs11
#47 329.7 cgo: malformed DWARF TagVariable entry
#47 343.5 make: *** [Makefile:213: bin/containerd] Error 2
cgo: malformed DWARF TagVariable entry

@thaJeztah thaJeztah force-pushed the 23.0_backport_remove_trustkey_id_migration branch from 1e5a57d to 7f64951 Compare December 1, 2022 23:21
@thaJeztah thaJeztah closed this Dec 2, 2022
@thaJeztah thaJeztah reopened this Dec 2, 2022
This is a subset of 1981706 on master,
preserving the tests for migrating the key to engine-id.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Turned out that the loadOrCreateTrustKey() utility was doing exactly the
same as libtrust.LoadOrCreateTrustKey(), so making it a thin wrapped. I kept
the tests to verify the behavior, but we could remove them as we only need this
for our integration tests.

The storage location for the generated key was changed (again as we only need
this for some integration tests), so we can remove the TrustKeyPath from the
config.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 5cdd6ab)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit e854b2a)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This is only used for tests, and the key is not verified anymore, so
instead of creating a key and storing it, we can just use an ad-hoc
one.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 8feeaec)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
It's never set, so we can remove it.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 85fddc0)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the 23.0_backport_remove_trustkey_id_migration branch from 7f64951 to 4952dc2 Compare December 3, 2022 17:09
@thaJeztah
Copy link
Copy Markdown
Member Author

thx! let me get this one in

@thaJeztah thaJeztah merged commit 3083236 into moby:23.0 Dec 8, 2022
@thaJeztah thaJeztah deleted the 23.0_backport_remove_trustkey_id_migration branch December 8, 2022 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants