-
Notifications
You must be signed in to change notification settings - Fork 258
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
The http removal will break private NuGet servers (NU1803 warning) #12015
Comments
NU1803 is a warning. It is likely that your project is elevating it to an error. |
Do we dup to #12013? |
Yes, I'm well aware that currently it's a warning but it will become an error in the future (Nov 2024) without an option to opt-out. |
My bad, I misread it because of the title. Do you mind tweaking the title to something that indicates that this issue is about the complete removal of non-https feeds? I can take a stab at it if you'd like me to. |
Sorry about that, please kindly do so. |
Should this throw when the hostname is localhost? |
Totally agree with this - we have a totally private nuget server which does not even connect to the internet so please don't make me have to secure it for no reason. This should be an operational decision and not something a tool forces on you. |
I agree with @mika76. We are running ProGet internally. I need a way to indicate that a nuget source is allowed to use HTTP instead of HTTPS. That can be done via domain suffixes or flagging specific feeds. To go through the process of either purchasing a cert or getting a cert issued internally, then added to all the windows workstations, and finally, working with my network security team to allow HTTPS traffic to a specific server is a BIG ask. |
+1 from me.. Running an internal nuget feed (internal gitlab instance) with no internet connection. This enforcement for internal and private nuget feeds has not much value.. + it breaks all build pipelines in CI/CD (at least in our environment ;)). A possible solution would be an additional command line parameter (e.g. --insecure). This approach would have advantages in case you are running multiple CI/CD runners and not have to change every configuration |
Team triage: Take into account the upvotes on #12013 |
+1 Same here as above - we have private NuGet feed in intranet. |
Yes, we would also like to be able to disable this feature in the global config file (or local Nuget.config) |
Please add CLI switch, e.g. |
+1 As many others have said, we run our own internal server for distributing library packages amongst the development team. The server is only available via the local LAN or VPN connection and isn't exposed to the wider internet. Support for some form of override to continue to use a http connection would be fantastic. |
+1 We are running a local nuget repository (baget) who don't need to be https. |
+1 please team we have private CI/CD and some form of override would be very helpful! |
+1 we have also an internal NuGet repo server, only reachable in our local network. HTTPS isn't necessary there |
+1 here too. We would prefer to keep using our private http nuget feed. |
+1 |
Darn it y'all, best laid plans :) OK, so nuget folks can we do a double pronged approach.
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Intranet" value="http://internal-nuget" allowInsecureHttpProtocol="true" />
<add key="Test Source" value="c:\packages" />
</packageSources>
In all cases output a warning for every server you try with http |
Would be nice if this could be configured in an SDK-style project as well. Something along the lines of: <RestoreAdditionalProjectSources AllowInsecureHttpProtocol="true">...</RestoreAdditionalProjectSources> |
What is the status of this "proposal"? I see @blowdart suggestion above. Has this been implemented? What's the "current recommendation"? It's April, and the original blog post stated that by NOVEMBER this would be come "permanent". Is the permanency at least on hold while an alternative is hashed out/implemented? (It might be a good idea to publish a blog article with an update on this proposal for wider informational purposes.) Clarifications on the current status of this is greatly appreciated! For the record, we're using an internal server with a fully qualified, internal domain name. So @blowdart proposal #3 wouldn't work for us. And really, #3 doesn't make sense. I don't like this whole push of HTTPS everywhere for all the reasons others state. I do understand the why, and when working over public networks, I 100% agree. And, to further that goal, I think proposal #3 just adds additional complexity/ambiguity around when a secure connection should/should not be used. #1 and #2 are probably enough. The only place where #3 might help would be for those who are using only a hostname in their URL for older commits using an older build process--but really, how many people do you think this would actually cover, and is "the juice worth the squeeze"? |
Hi all, I'm working on a proposal. The challenge I see here is that there are two camps. One to solve today's challenge in the .NET 8 timeframe. The other to solve the long term challenge of being on a HTTPS source, but wanting more flexibility until you have an established chain of trust.
For 1. this could likely be solved by a proposed There will likely need to be different levers of control here. For example, one might be able to set both of these flags at both the global nuget.config level: i.e.
For more fine-grain control, you might also do this at the package source level.
The challenge with this would be an additional metadata item on a traditional key/pair value. Another way this could look is(not as intuitive in my opinion and would give less individual control):
Lastly, there could be an environment variable for the local machine such as If these scenarios do not cover everything and there's still desire for a We know this is a disruptive topic and that's why we're hoping to land something in .NET 8 given it is a LTS. Thank you all for your constant feedback on this topic. We'll likely blog about our next steps once we can finalize a proposal. Any and all feedback here will be appreciated. I will post a pull request here with a proposal headed in the direction of the comments here and some thorough team review. |
Hi Jon, Thanks for adding your thoughts to this thread. I really like fine-grain control proposal. I think it is simple and explanatory without having to lookup additional documentation to check what each setting does. Something like like in the next nuget update would be really appreciated. Thanks again to all who are looking at the best way to solve this. |
For the record, I don't want to establish a chain of trust for my strictly internal nuget feeds. It's unnecessary and adds additional cost and complexity to my on-prem CI/CD process. Of course, if I'm pushing packages to an external source, or even sourcing them externally, I'm going to use HTTPS. But when I'm in a walled garden, I don't need this. Furthermore, how is this really any more secure for internal servers? MITM attacks are prevented...maybe. But, what about the disgruntled employee with access to servers, feeds, and generally being able to insert malicious code into your internal software supply chain? (Hopefully, other security tooling will catch this, but) HTTPS everywhere does not resolve this challenge by itself. |
@JonDouglas I would still want a command-line switch. We manage a lot (hundreds, nearing 1000) of individual software products, and to have to make a code commit to each and every one of them would be way more difficult than simply adding a command-line switch to our CI/CD build pipeline. |
I set up a private repository using Proget docker. It's publically available with a valid certificate via https. When I configure nuget.config to use my url by adding the following line to the packageSources element: <add key="NAME" value="https://MY_DOMAIN/nuget/nuget/v3/index.json"/> Doing a
Why is it forcing port 80, resulting in the client using HTTP to a HTTPS server. I'm adding some extra info: |
@mterwoord Your problem doesn't look related to this issue. What's the output of |
@BartVanBeurden Not related, but caused: I had proget running over http, but I want to get rid of my build warnings. Accessing the url in the browser presents me with a Login form. After entering the credentials there I see a json file containing the nuget manigest. So that all looks ok. |
A login form is probably not what the nuget client expected as a response to the URL, is it? |
I should have been more clear. That's basic authentication form, so the form itself is from the browser. I tried with VS code to do a raw http request. Passing |
Bringing some pieces together here for everybody following this issue. The Allow insecure connections and disable certificate validation proposal has been implemented in NuGet/NuGet.Client#5343. It will be available in NuGet 6.8.0.63 and later versions. It's not available in the .NET SDK 8.0.100-preview.7 because this SDK includes NuGet 6.8.0.41 ( When a new version of the SDK will be available, the new <add key="Contoso" value="http://contoso.com/packages/" allowInsecureConnections="true" /> I've been adding |
Well, the pull request mentioned in my previous comment was only about adding an So contrary to what I predicted, the |
Hi friends, Check out our blog here. https://devblogs.microsoft.com/nuget/https-everywhere-update/ Thus I am closing this issue as this is shipping soon! 🚢 🐿️ |
Hello everyone can anyone guide me into the correct usage of this parameter?
But:
|
https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesources |
Yes 🤷♂️.. which is the same as in the nuget-post.. Or do I miss something? 🤔 |
I completely support the effort to force users to use https, however I'm concerned about not being able to use private NuGet servers (such as BaGet) on my local machine since:
Please consider keeping the opt-out option permanently or suggest an alternative solution.
The text was updated successfully, but these errors were encountered: