Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman save: enforce signature removal #11714

Merged

Conversation

vrothberg
Copy link
Member

@vrothberg vrothberg commented Sep 23, 2021

Enforce the removal of signatures in podman save to restore behavior
prior to the migration to libimage. We may consider improving on that
in the future. For details, please refer to the excellent summary by
@mtrmac [1].

[1] #11669 (comment)

Signed-off-by: Valentin Rothberg [email protected]

@vrothberg
Copy link
Member Author

@mtrmac @rhatdan PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 23, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2021
@rhatdan
Copy link
Member

rhatdan commented Sep 23, 2021

LGTM

Enforce the removal of signatures in `podman save` to restore behavior
prior to the migration to libimage.  We may consider improving on that
in the future.  For details, please refer to the excellent summary by
@mtrmac [1].

[NO TESTS NEEDED] - manually verified but exisiting tests need some
further investigation (see [1]).

[1] containers#11669 (comment)

Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg vrothberg force-pushed the save-remove-signatures branch from 0ff9e28 to 01bf8a6 Compare September 23, 2021 11:51
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually wrong, podman save supports docker-dir (c/image/directory), which can support signatures.

So I’m not, in the end, sure we want this right now — AFAICS this trades one regression for another.

OTOH I appreciate the point that many users just use podman save without specifying the format, so that case might not matter that much. Still…

@@ -305,8 +305,6 @@ type ImageSaveOptions struct {
OciAcceptUncompressedLayers bool
// Output - write image to the specified path.
Output string
// Do not save the signature from the source image
RemoveSignatures bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the HTTP API, is it OK to change it like this? I guess unrecognized fields don’t cause failures?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking. It's an internal (non-REST) API. The REST handlers always set it to true.

Copy link
Collaborator

@mtrmac mtrmac Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake, I should write down how things work one of these days. It’s pkg/domain/infra/tunnel.ImageEngine.Save(entities.ImageSaveOptions)pkg/bindings/images.Export(pkg/bindings/images.ExportOptions)pkg/api/handlers/libpod.ExportImagespkg/domain/infra/abi.ImageEngine.Save(entities.ImageSaveOptions), right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is the exact flow.

@vrothberg
Copy link
Member Author

So I’m not, in the end, sure we want this right now — AFAICS this trades one regression for another.

In the interest of time, with Podman v3.4 around the corner, I suggest merging and then refine from there. As you pointed out in the other PR, the fact that the tests didn't bark during the libimage migration is concerning. So I am afraid of a potential rabbit hole.

@mtrmac
Copy link
Collaborator

mtrmac commented Sep 23, 2021

So I’m not, in the end, sure we want this right now — AFAICS this trades one regression for another.

In the interest of time, with Podman v3.4 around the corner, I suggest merging and then refine from there. As you pointed out in the other PR, the fact that the tests didn't bark during the libimage migration is concerning. So I am afraid of a potential rabbit hole.

Works for me, just please make sure we have an issue tracking this. #11669 was closed; do you want to reopen it?

@vrothberg
Copy link
Member Author

Works for me, just please make sure we have an issue tracking this. #11669 was closed; do you want to reopen it?

Great idea! #11669 is a PR but I will take your comment with the excellent summary and turn it into an issue.

@vrothberg
Copy link
Member Author

Here's the follow-up issue: #11718

@mtrmac
Copy link
Collaborator

mtrmac commented Sep 23, 2021

#11669 is a PR

Oops, my mistake.

Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@rhatdan
Copy link
Member

rhatdan commented Sep 23, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 23, 2021
@openshift-merge-robot openshift-merge-robot merged commit b08acdb into containers:main Sep 23, 2021
@vrothberg vrothberg deleted the save-remove-signatures branch September 23, 2021 14:06
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants