bazel-remote icon indicating copy to clipboard operation
bazel-remote copied to clipboard

Support basic HTTP authentication for remote asset API

Open JSGette opened this issue 1 year ago • 1 comments

I have started bazel-remote with remote asset API enabled to use as a read-through cache for Artifactory that requires authentication. Obviously, it fails to work because I didn't set any credentials for Artifactory. It would be sufficient (in my case at least) to support basic authentication.

This is the command that I used to start bazel-remote: ./bazel-remote-2.4.4-linux-x86_64 --dir=/bazel_cache/bazel_remote --grpc_address=localhost:9092 --experimental_remote_asset_api --max_size=50

And this is the error that I get (401 obviously): 2024/06/27 11:39:32 GRPC ASSET FETCH <artifactory_url>.zip 401 Unauthorized

JSGette avatar Jun 27 '24 12:06 JSGette

Disclaimer: not a maintainer - just another user. I think adding support for invoking a credential helper (similar to Bazel's --credential_helper flag) would be better, so that most header-based authentication schemes can be supported.

malt3 avatar Mar 07 '25 21:03 malt3