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

http_archive should support authentication #7770

Closed
ittaiz opened this issue Mar 20, 2019 · 10 comments
Closed

http_archive should support authentication #7770

ittaiz opened this issue Mar 20, 2019 · 10 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@ittaiz
Copy link
Member

ittaiz commented Mar 20, 2019

Description of the problem / feature request:

http_archive should support retrieving resources which require authentication

Feature requests: what underlying problem are you trying to solve with this feature?

I want to use http_archive to download tar.gz from a private github repository since from our benchmarks this is ~25% faster than using git_repository with shallow-since (we use a specific commit)

Our suggestion is to use the popular netrc format and have http_archive read it (if exists and indicated that its usage is desired) and use it to authenticate (basically build the relevant authentication header).

Any other information, logs, or outputs that you want to share?

this was discussed with @aehlig and @dslomov which agreed http_archive should support authentication

@buchgr
Copy link
Contributor

buchgr commented Mar 20, 2019

+1. I think this should integrate well with Bazel's existing authentication mechanisms.

@iirina iirina added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged labels Mar 21, 2019
@dslomov dslomov added the P2 We'll consider working on this in future. (Assignee optional) label Mar 21, 2019
@dslomov
Copy link
Contributor

dslomov commented Mar 21, 2019

@dkelmer wdyt? related to #7469

@dkelmer
Copy link
Contributor

dkelmer commented Mar 26, 2019

I'll look into netrc, thanks for the tip @ittaiz

@buchgr, which existing authentication mechanisms are you referring to?

@buchgr
Copy link
Contributor

buchgr commented Mar 28, 2019

@dkelmer BES and Remote Execution support --google_* authentication flags and soon --aws_* authentication flags. We also have a common abstraction that ideally remote repos would utilize: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/runtime/AuthHeadersProvider.java?q=AuthHeadersProvider.java

@ittaiz
Copy link
Member Author

ittaiz commented May 2, 2019

@dkelmer please note #7978 which is under @aehlig’s mentoring

@keith
Copy link
Member

keith commented Sep 4, 2019

Related #9327

@meisterT
Copy link
Member

What's left to do here?

@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
@petemounce
Copy link
Contributor

We keep third party deps in a GCS bucket. What options for authenticating do we have? It's not clear to me that .netrc can suffice here, and I'm unfamiliar with how I'd automate getting credentials from gcloud to a form usable by bazel here.

@tjgq
Copy link
Contributor

tjgq commented Nov 23, 2022

See #15013. We are planning to add credential helper support to http_archive.

@tjgq
Copy link
Contributor

tjgq commented Mar 7, 2023

Deduplicating against #15013.

@tjgq tjgq closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

No branches or pull requests

10 participants