-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add a design for authoritative http downloads using .netrc #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The document looks good. Can you please also add a line to README.md
which serves as an index of all design documents, putting it to "under review".
designs/2019-05-01-http-auth.md
Outdated
|
||
We will add the following properties to _http_archive_ rule and `SkylarkRepositoryContextApi.downloadAndExtract`: | ||
- netrc_file_path : String | ||
- the location of the _.netrc_ file. Default will be the user home directory if not supplied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the user home directory" or "the file .netrc
in the user's home directory"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarified:
"Default location for the .netrc file will be the user home directory, e.g. /Users/<username>/.netrc
"
Added a row in the README.md, I have put the Category as External Repositories, hope it is the correct one :) |
Yes, that's the correct one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
@aehlig Should I announce it on |
I like where you are going with the path prefixing, so that different URLs can get different access. Have you considered an approach where the URL -> credential information is done in it's own rules, and then http_archvie (and maven rules, etc.) can (transparently) use that for the download. Something like
|
Looks like a good idea, a separate rule for globally define the authorization types per domain / host, since there will be only one .netrc configuration globally anyways (most probably). |
@aiuto Interesting! |
Related discussion on the mailing list: https://groups.google.com/forum/#!topic/bazel-dev/oXSQfq7W0jM |
How would such an approch handle conflicting definitions? If it should be transparent, the rules cannot be passed the name of the authorization repository. But if you have several |
We would either allow only one add_authorization() or last one wins. Only having one should be sufficient. I |
http-archive rule does not have an ability to download from urls which require authorization.
This proposal describes how to make additions to the API to allow various standard / custom protocols using the .netrc file as storage for the credentials / tokens.