Skip to content

nuget source password encryption story #1851

Closed as not planned
NuGet/NuGet.Client
#813

Description

@yishaigalatzer

Rob adding text on 2/10/2017:
nuget.exe | dotnet.exe can now use encrypted passwords in nuget.config files -- when running on windows ONLY.
Ideally, we'd support dotnet.exe on other platforms too, so they don't need to store passwords via cleartext.

This would need APIs from .NET Core. See the related https://github.com/dotnet/corefx/issues/6746

Activity

  1. added this to the milestone on Dec 18, 2015
  2. yishaigalatzer commented on Dec 18, 2015

    @yishaigalatzer
    Author
  3. emgarten commented on Feb 4, 2016

    @emgarten
    Member

    Is this needed for xplat?

  4. yishaigalatzer commented on Feb 4, 2016

    @yishaigalatzer
    Author

    Yes but not for rc, and debatable for rtm

  5. modified the milestones: 3.4 RTM, on Mar 11, 2016
  6. 73 remaining items

  7. zivkan commented on Jul 25, 2022

    @zivkan
    Member

    @hamarb123 this issue (source password encryption, for private/authenticated feeds) is not related to http/https. Please create a new issue for that.

  8. hamarb123 commented on Jul 26, 2022

    @hamarb123

    I know it's not related directly. As I said (I think), I'm using a client-cert certificate that runs over https, I'm currently having to use the http version (which doesn't have client-cert or encryption) though because I don't want to store the client-cert certificate password unencrypted. I could probably set up a https proxy that doesn't require client-cert as well, but I don't want to accidentally expose it outside of the machine so I have intentionally used the http one on localhost instead of doing that. Ideally I'd like this feature to be implemented so I don't have to use the http one or find a different solution at all.

  9. tmds commented on Oct 11, 2022

    @tmds
  10. added
    Priority:2Issues for the current backlog.
    and removed
    Priority:1High priority issues that must be resolved in the current sprint.
    on Oct 3, 2023
  11. p10tyr commented on Dec 6, 2024

    @p10tyr

    Still a problem today. OS's have built-in key chain managers so I wonder why it's not compatible?
    We can't be moving developers over to Linux / Mac if we MSFT is forcing them to store plain text.

  12. p10tyr commented on Dec 6, 2024

    @p10tyr
  13. Entroper commented on Oct 7, 2025

    @Entroper

    Coming up on 10 years for this one. Any updates?

  14. hicham-bouchikhi commented on Jul 28, 2026

    @hicham-bouchikhi
    Image

    Still nothing boys

  15. chucker commented on Jul 29, 2026

    @chucker

    I understand that ProtectedData is too tightly coupled with Windows's DPAPI, but .NET also has ISecureStorage via Microsoft.Maui.Storage. It seems that's already a drop-in replacement

    • for Windows, where it uses DataProtectionProvider, i.e. presumably the same DPAPI
    • for macOS (and iOS / iPadOS, which may not be useful for this issue), where it uses Keychain
    • for Android, which probably isn't that useful here

    For Linux, it seems org.freedesktop.secrets is a good starting point that GNOME Keyring and KDE Wallet (and presumably others?) seem to adopt.

    Given that, how about

    1. making NuGet Client depend on Microsoft.Maui.Essentials instead of ProtectedData (which would already solve this ticket for developers on macOS)
    2. expanding MAUI Essentials to support org.freedesktop.secrets
  16. hicham-bouchikhi commented on Aug 3, 2026

    @hicham-bouchikhi

    I understand that ProtectedData is too tightly coupled with Windows's DPAPI, but .NET also has ISecureStorage via Microsoft.Maui.Storage. It seems that's already a drop-in replacement

    * for Windows, where it uses `DataProtectionProvider`, i.e. presumably the same DPAPI
    
    * for macOS (and iOS / iPadOS, which may not be useful for this issue), where it uses `Keychain`
    
    * for Android, which probably isn't that useful here
    

    For Linux, it seems org.freedesktop.secrets is a good starting point that GNOME Keyring and KDE Wallet (and presumably others?) seem to adopt.

    Given that, how about

    1. making NuGet Client depend on `Microsoft.Maui.Essentials` instead of `ProtectedData` (which would already solve this ticket for developers on macOS)
    
    2. expanding MAUI Essentials to support org.freedesktop.secrets
    

    I’m not an expert in this area, so I may be missing something, but would NuGet Client actually need to depend on Microsoft.Maui.Essentials?

    Since org.freedesktop.secrets is a standard D-Bus API, it should be possible to access it directly from C# using a D-Bus client or existing .NET bindings. MAUI’s ISecureStorage could provide a useful abstraction, but it does not seem strictly necessary for implementing Linux support.

  17. jebriede commented on Aug 10, 2026

    @jebriede
    Contributor

    Today, the best way to accomplish this is to use the credential provider. For example, Azure Artifacts supports the credential provider: https://github.com/microsoft/artifacts-credprovider. There are no immediate plans to support encrypted secrets in the NuGet.config. Other ways to provide secrets to NuGet include the NUGET_API_KEY environment variable (see https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables) for push and for restore NuGetPackageSourceCredentials_{name} (see https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#credentials-in-nugetconfig-files).

  18. 0xced commented on Aug 30, 2026

    @0xced

    I'm flabbergasted this was closed as not planned after 10 years.

    Quoting Sean Iyer (@seaniyer), Sr Product Manager with the NuGet team in the What's New in NuGet video, published on November 13, 2025.

    In this session, we would like to show how those tools are getting smarter, powered by AI, and how the ecosystem is becoming more trustworthy thanks to the new security features.

    He talks about NuGet MCP Server (AI), then trusted publishing and NuGet audit (security).

    But shouldn't security start with the basics, like not having a clear text password for private NuGet feeds in the ~/.nuget/NuGet/NuGet.Config file‽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions