Skip to content

http_archive should support authentication #7770

Closed as not planned
Closed as not planned

Description

@ittaiz

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

Activity

  1. buchgr commented on Mar 20, 2019

    @buchgr
    Contributor

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

  2. added
    team-ExternalDeps
    untriaged
    on Mar 21, 2019
  3. added and removed
    untriaged
    on Mar 21, 2019
  4. added
    P2
    on Mar 21, 2019
  5. dslomov commented on Mar 21, 2019

    @dslomov
    Contributor

    @dkelmer wdyt? related to #7469

  6. dkelmer commented on Mar 26, 2019

    @dkelmer
    Contributor

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

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

  7. buchgr commented on Mar 28, 2019

    @buchgr
    Contributor

    @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

  8. ittaiz commented on May 2, 2019

    @ittaiz
    MemberAuthor

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

  9. keith commented on Sep 4, 2019

    @keith
    Member

    Related #9327

  10. meisterT commented on May 12, 2020

    @meisterT
    Member

    What's left to do here?

  11. added
    team-OSS
    on Jun 15, 2020
  12. removed
    team-OSS
    on Nov 29, 2021
  13. petemounce commented on Nov 23, 2022

    @petemounce
    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.

  14. tjgq commented on Nov 23, 2022

    @tjgq
    Contributor

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

  15. tjgq commented on Mar 7, 2023

    @tjgq
    Contributor

    Deduplicating against #15013.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2team-ExternalDepstype: feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions