-
Notifications
You must be signed in to change notification settings - Fork 16
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
Preliminary support for HTTP_AUTH
.
#84
Conversation
c6f633b
to
0bd36c0
Compare
It looks like Alpine withdrew a package breaking one of the legs?
|
We should probably migrate tests to only pull from Wolfi, where we withdraw less often and have more control in general. |
This fixes alpine for now by just regenerating the lock, but I agree we should switch to something where we have more control: #85 |
c11d57d
to
eb1a25e
Compare
I am still working through a few issues, but I believe the main problem at this point is that we don't support range requests. Signed-off-by: Matt Moore <mattmoor@chainguard.dev>
eb1a25e
to
da6cdd5
Compare
@mattmoor Thank you for the changes. We are quite excited about using this instead of building on top of base image! I am wondering if we could use similar approach for fetching token within bazel rules as in rules_oci so that the rule don't depend on external env vars. I don't know much details about chainctl, but I am happy to implement the auth in bazel if you think this is feasible. |
@sfc-gh-mhazy I'm receptive to that. I added I bet @imjasonh and @jonjohnsonjr will have thoughts, but open to ideas for what we'd do here! |
apko and TF-apko have support for calling chainctl to provide auth for packages, which I think we should support in rules_apko too. They also have code support for doing Chainguard identity auth without chainctl based on env vars, if that's interesting to you. |
@imjasonh I think ideally the bazel rules would
In rules_apko, the apk fetch happens completely outside of apko, as part of apk.bzl. Perhaps we should fetch token there ("natively" with rctx.download or with chainctl) Maybe lets move the discussion to some doc? |
Thanks, this is really great context. I think the fix will be for apk.bzl to fetch the token (using chainctl or Then, when building the image in offline mode, we should (we might already) not attempt to get a token until we're actually about to use it to fetch an apk -- which we won't do if offline mode. I think this might already work this way, or if not, it could fairly easily. This would be a performance benefit even in online-mode, since a token wouldn't be requested if there are no APKs to fetch if they're already in the cache. |
I am still working through a few issues, but I believe the main problem at this point is that we don't support range requests.