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 uses incorrect path to auth.json #4227

Closed
mtrmac opened this issue Oct 9, 2019 · 1 comment · Fixed by #4232
Closed

Podman uses incorrect path to auth.json #4227

mtrmac opened this issue Oct 9, 2019 · 1 comment · Fixed by #4232
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 9, 2019

/kind bug

Description

After https://github.com/containers/libpod/pull/3760/files , podman always hard-codes SystemContext.AuthFilePath to a non-empty value, overriding the built-in defaults in c/image — but different from the built-in defaults.

E.g. for the ordinary case of an unprivileged user with XDG_RUNTIME_DIR set, the c/image default is /run/user/$UID/containers/auth.json, while the Podman default is /run/user/$UID/auth.json.

This breaks podman login+skopeo, as well as Skopeo integration tests, and presumably any other non-Podman software that relies on podman login.

Steps to reproduce the issue:

  1. podman login $registry
  2. skopeo inspect docker://$registry/$image
    (or use strace -e 'trace=%file' … |& grep auth to confirm)

Describe the results you received:

In Skopeo debug output,

level=debug msg="Credentials not found"

+ a failure to read data.

Describe the results you expected:

Successful image use.

Additional information you deem important (e.g. issue happens only occasionally):

This does not show up as a Podman failure as long as Podman is consuming its own podman login effects because both the writer and the readers use the same incorrect path.

Package info (e.g. output of rpm -q podman or apt list podman):

podman-1.6.1-2.fc30 as well as current master ( f61e399 ).

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 9, 2019
@vrothberg
Copy link
Member

Thanks for the detailed explanation, @mtrmac! We need to check when we regressed on that and maybe need to backport the fix (Cc: @mheon). It's unlikely that I will find time to look into this today. If others want to pick it up, feel free.

nalind added a commit to nalind/skopeo that referenced this issue Oct 15, 2019
Temporarily work around containers/podman#4227
until Fedora has an updated package that includes the fix, at which
point we should revert this patch.

Signed-off-by: Nalin Dahyabhai <[email protected]>
nalind added a commit to nalind/skopeo that referenced this issue Oct 15, 2019
Temporarily work around containers/podman#4227
until Fedora has an updated packaged version of podman that includes
that fix, at which point we should revert this patch.

Signed-off-by: Nalin Dahyabhai <[email protected]>
vrothberg pushed a commit to vrothberg/skopeo that referenced this issue Dec 9, 2019
Temporarily work around containers/podman#4227
until Fedora has an updated packaged version of podman that includes
that fix, at which point we should revert this patch.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. 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 a pull request may close this issue.

3 participants