aws-codeartifact-proxy
aws-codeartifact-proxy copied to clipboard
Nuget header not adding Authentication
Hello and thank you for your work on this.
We're trying to use nuget to push artifacts. The container starts and we get the Authorization successful result. When we attempt to nuget push or install we get a prompt for credentials. Looking at the code and doing some packet captures to try and find the issue.
Did you ever figure out what was going on with this? Running into the same error...
I can also confirm that this project does not work for NuGet. As I understand it this is because unlike e.g. npm
or pip
, NuGet uses a handshake protocol for authentication rather than just plain HTTP auth. To be able to proxy NuGet packages from an upstream repository that requires authentication, one would need the proxy server to implement some (if not all) of NuGet's client-side authentication flow.
Here are some relevant resources describing how NuGet auth works:
Any chance of actually supporting nuget?
Any chance of actually supporting nuget?
I'll have to read up on how the nuget authentication works and do some testing. At the moment, I don't use any .NET languages or even have Visual Studio installed so will have to make a "mock" project to test it.
I know this has been sitting out here for a while, just worked through this today. Can confirm that doing something like https://github.com/arinet/aws-codeartifact-proxy/commit/5ef6a633233584df41a61265aa34bc02f1bab6f8 resolves the issue. Don't be like me and bang your head into a table not realizing that VS's nuget instance caches the responses; when you test, do yourself a favor and either flush that cache or invalidate it by changing the proxied source
name, host, or port. I likely spent a few extra hours on this today confused as to why it wasn't working, only to come to the conclusion it was cached. Upon flushing that, everything magically started working as expected.