Skip to content

http_file and http_archive can't make authenticated calls to Azure storage #14372

@robin-wayve

Description

@robin-wayve

Description of the problem / feature request:

Allow extra request headers to be passed to http_archive / http_file

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

In order to download files from private Azure Storage, clients need to provide an OAuth2 token (which can be done via auth_patterns and a netrc file) and additionally set an x-ms-version header.

Docs: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory

What operating system are you running Bazel on?

Ubuntu Linux 18.04

What's the output of bazel info release?

release 4.2.1

Have you found anything relevant by searching the web?

We checked if this might be possible through bazel-skylib or repository_ctx.download(_and_extract) but it does not seem so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions