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

--authfile command line argument for image sign command. #12270

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Nov 11, 2021

Adds the --authfile command line argument to allow users to set the location of the auth file to use.

Replaces: #10975
Fixes: #10866

Signed-off-by: José Guilherme Vanz [email protected]
Signed-off-by: Daniel J Walsh [email protected]

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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 Nov 11, 2021
@rhatdan
Copy link
Member Author

rhatdan commented Nov 11, 2021

@edsantiago @vrothberg @mtrmac PTAL

test -e "$dir/$sigfile" || die "Missing signature file '$sigfile'"

# Confirm good signature
GNUPGHOME=$_GNUPGHOME_TMP gpg --verify "$dir/$sigfile"
Copy link
Member

Choose a reason for hiding this comment

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

You don't need this if you have the next line

@mheon
Copy link
Member

mheon commented Nov 11, 2021

LGTM once Ed's comment is addressed

@edsantiago
Copy link
Member

Added Requires: gnupg to fedora rawhide specfile.

@lsm5, please cherry-pick that to whatever other branches might need it.

@jnovy, please add that to RHEL specfile when appropriate.

@jnovy
Copy link
Contributor

jnovy commented Nov 11, 2021

Added to CentOS Stream 9/RHEL9 GA spec @edsantiago Suggest to file a bugzilla for requests like these next time so that QE can test this to assure it's not omitted. Thanks.

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’m probably missing something obvious here but this looks rather wrong at a first glance.

pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
@rhatdan rhatdan changed the title --authfile command line argument for image sign command. --sigfile command line argument for image sign command. Nov 11, 2021
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 don't think authfile is involved in image signing.

Isn’t it involved, if only to determine what image (and digest) to create the signature for?


The only way I can read #10866 is that the request truly is for --authfile, with the usual --authfile semantics. The report is not very explicit (in particular “Steps to reproduce the issue:” is downright pointless), but both the --authfile wording and the mention of “the default auth file location” are a better fit for auth.json than for the single signature file.


How does --sigfile and --all work together? AFAICS it doesn’t work usefully.

pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
docs/source/markdown/podman-image-sign.1.md Outdated Show resolved Hide resolved
docs/source/markdown/podman-image-sign.1.md Outdated Show resolved Hide resolved
cmd/podman/images/sign.go Outdated Show resolved Hide resolved
Adds the --authfile command line argument to allow users to use
alternative authfile paths when signing images.

Replaces: containers#10975
Fixes: containers#10866

Signed-off-by: José Guilherme Vanz <[email protected]>
Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan changed the title --sigfile command line argument for image sign command. --authfile command line argument for image sign command. Nov 11, 2021
@TomSweeneyRedHat
Copy link
Member

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

A final head nod from @edsantiago / @mtrmac would be good.

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.

Looks reasonable WRT c/image usage; I don’t know enough about how Podman generally deals with SystemContext to have an opinion on the exact data path (e.g. should this come from ir.Libpod.SystemContext()? It seems that’s not how it works.)

@rhatdan rhatdan added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2021
@openshift-merge-robot openshift-merge-robot merged commit 8f3fb74 into containers:main Nov 13, 2021
@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.

podman image sign does not accept --authfile parameter
9 participants