-
Notifications
You must be signed in to change notification settings - Fork 841
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
Support basic auth in package-indices #5509
Comments
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ Technically, the bug is in |
✨ _**This is an old work account. Please reference @brandonchinn178 for all future communication**_ ✨
<!-- updated by mention_personal_account_in_comments.py -->
…---
@snoyberg maybe this should stay open until Stack uses the new version of
pantry?
On Thu, Mar 25, 2021, 9:41 PM Michael Snoyman ***@***.***> wrote:
Closed #5509 <#5509> via
commercialhaskell/pantry#32
<commercialhaskell/pantry#32>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5509 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGUC75KSIRXJE5S33DZ5FF3TFQM7TANCNFSM4ZYJPITA>
.
|
I just opened a PR #5510. Note that I didn't intentionally close this issue, looks like it was triggered by merging that PR. |
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ Yeah, I figured. No worries! |
Please follow the steps below for reporting a bug:
Make sure that you are using the latest release (currently stack-2.5.1).
See the upgrade instructions to upgrade.
Please use the following schema for your bug report:
General summary/comments (optional)
We're trying to set up a company internal proxy for Hackage, so we're trying to set
download-prefix
inpackage-indices
tohttps://username:[email protected]
.TL;DR
pantry
'sget
function inHackage.Security.Client.Repository.HttpLib.HttpClient
Steps to reproduce
Specify a URL in
download-prefix
with username/password.rm -rf stack.yaml.lock
. When runningstack build
, check network traces and notice that username/password isn't being propagated.Expected
It should download files from our proxy with user credentials
Actual
First problem: we get an error about
root.json
:which is weird because if we
curl
the URL, we loadroot.json
fine. With some debug statements, we found out that our proxy is actually returning a JSON object sayingAuthentication is required
. This ticket is filed here: haskell/hackage-security#251So after debugging the first issue, we find out that stack is somehow not propagating the basic auth credentials. Then I printed out
uri
inHackage.Security.Client.Repository.Remote.getFile.download
and it shows the URI with the basic auth credentials, so up to that point it keeps the basic auth around. But then it callshttpGet
whichpantry
implements in its own implementation ofHackage.Security.Client.Repository.HttpLib.HttpClient
, and there it callssetRequestHeaders
, which seems to override theAuthorization
header set insetUri
.Stack version
Built from master
Method of installation
The text was updated successfully, but these errors were encountered: