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

Bootc with credential helper fails without /etc/ostree/auth.json #562

Closed
p5 opened this issue May 23, 2024 · 3 comments · Fixed by #563
Closed

Bootc with credential helper fails without /etc/ostree/auth.json #562

p5 opened this issue May 23, 2024 · 3 comments · Fixed by #563
Labels
area/cli Related to the client/CLI area/config Related to configuration triaged This looks like a valid issue

Comments

@p5
Copy link

p5 commented May 23, 2024

A bit of a strange one, and I'm not too sure where to file this.

I am trying to deploy a bootc image to AWS, with the image hosted in ECR. To pull from ECR, it's best to use the docker-credential-ecr-login helper. I don't know if any of this information about the credential helpers is actually relevant, but I do not currently have an environment to test without.

So I added the credential helper binary to my $PATH, along with the following /etc/containers/registries.conf.d/001-ecr-login.conf config:

credential-helpers = ["ecr-login"]

A bootc upgrade failed with "authentication required".

Now comes the weird part. If I create an empty /etc/ostree/auth.json file, an upgrade works...

If this is a required file, I suggest a relevant error message be thrown when not present. Or specifying this somewhere in the docs would also be good.

Thank you
Rob

@cgwalters cgwalters added area/config Related to configuration triaged This looks like a valid issue area/cli Related to the client/CLI labels May 23, 2024
cgwalters added a commit to cgwalters/bootc that referenced this issue May 23, 2024
In the [current architecture](https://github.com/ostreedev/ostree-rs-ext/)
unfortunately it's going to be hard for us to fix this...it's explicitly
by design today: https://github.com/ostreedev/ostree-rs-ext/blob/c0e8c8fe9c3344b9d349e2c9371e1335e1173bef/lib/src/container/mod.rs#L427

To handle the "credential helper only" case we'd need to enhance
skopeo with something like `--no-root-homedir`.

Closes: containers#562
@cgwalters
Copy link
Collaborator

In the current architecture unfortunately it's going to be hard for us to fix this...it's somewhat explicitly by design today: https://github.com/ostreedev/ostree-rs-ext/blob/c0e8c8fe9c3344b9d349e2c9371e1335e1173bef/lib/src/container/mod.rs#L427

@cgwalters
Copy link
Collaborator

PR in #563 for docs, sorry it's going to be hard for us to do better in a short term.

@p5
Copy link
Author

p5 commented May 23, 2024

Updating the docs is great, thanks! Just don't want others to get stuck on this for as long as I did 😆

Since the docs have been updated, it should be clearer to others how to resolve this issue.
Will close this as complete.

Edit: They will be updated once the PR is merged. Jumped the gun a little 😆

@p5 p5 closed this as completed May 23, 2024
cgwalters added a commit to cgwalters/bootc that referenced this issue May 23, 2024
In the [current architecture](https://github.com/ostreedev/ostree-rs-ext/)
unfortunately it's going to be hard for us to fix this...it's explicitly
by design today: https://github.com/ostreedev/ostree-rs-ext/blob/c0e8c8fe9c3344b9d349e2c9371e1335e1173bef/lib/src/container/mod.rs#L427

To handle the "credential helper only" case we'd need to enhance
skopeo with something like `--no-root-homedir`.

Closes: containers#562
Signed-off-by: Colin Walters <walters@verbum.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the client/CLI area/config Related to configuration triaged This looks like a valid issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants