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

GitHub App as Image Registry-Specific Authentication Option #2383

Closed
1 of 3 tasks
joaoestrela opened this issue Aug 5, 2024 · 3 comments
Closed
1 of 3 tasks

GitHub App as Image Registry-Specific Authentication Option #2383

joaoestrela opened this issue Aug 5, 2024 · 3 comments
Assignees
Labels
area/controller area/security good first issue Good issue for a new contributor to handle help-wanted Community help on this would be appreciated kind/enhancement priority/normal size/small
Milestone

Comments

@joaoestrela
Copy link

Checklist

  • I've searched the issue queue to verify this is not a duplicate feature request.
  • I've pasted the output of kargo version, if applicable.
  • I've pasted logs, if applicable.

Proposed Feature

Support GitHub App auth as Image Registry-Specific Authentication Option

Motivation

Some users might be using GHCR as their image registry, currently it is only possible to use Kargo with public ghcr.io or use username/password which isn't a best practice for machine to machine auth

@Dhouib-Mohamed
Copy link

@krancour If possible I would like to take this issue
Can you provide me with more information about the related files to start with since this is my first contribution

@krancour
Copy link
Member

krancour commented Aug 6, 2024

@Dhouib-Mohamed it might be as simple as a small change here to allow this helper to work for image repos in addition to git repos:

if credType != credentials.TypeGit || secret == nil {

You'll want to test it out a bit though to verify it works as intended in case I am overlooking something.

@krancour
Copy link
Member

krancour commented Aug 10, 2024

With major thanks to @Dhouib-Mohamed who did a fair amount of work on this issue in #2391, we have come to the conclusion that this requested feature is not technically possible at the moment.

Despite all appearances (a package permissions option when configuring a GitHub App), an App installation token simply cannot enable access to a private ghcr.io package repository.

And here is an existing, 2+ year old thread about this very topic:

https://github.com/orgs/community/discussions/34324

I am tentatively closing this issue, but if anyone knows something that we don't -- if you have seen this work or personally done it -- please do feel free to share your experience or even re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller area/security good first issue Good issue for a new contributor to handle help-wanted Community help on this would be appreciated kind/enhancement priority/normal size/small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants