dotnet add package DontCommitSecrets --version 0.0.2
NuGet\Install-Package DontCommitSecrets -Version 0.0.2
<PackageReference Include="DontCommitSecrets" Version="0.0.2" />
paket add DontCommitSecrets --version 0.0.2
#r "nuget: DontCommitSecrets, 0.0.2"
// Install DontCommitSecrets as a Cake Addin #addin nuget:?package=DontCommitSecrets&version=0.0.2 // Install DontCommitSecrets as a Cake Tool #tool nuget:?package=DontCommitSecrets&version=0.0.2
This project has been born because of secrets that are required to be configured in your project, particularly when trying to reproduce an issue on production.
Usually this involves editing a file to provide the secrets, which actually could be a problem because this data might be committed to a git repository. Committing a secret can be reversed, along with editing the history, but is almost always very annoying to do. Therefore prevention is better than actual fixing the issue.
To solve this problem, the DontCommitSecrets server has been created! This server is meant to be run on the same machine as the server which your application runs at. Then your application calls the
GET /api/secrets endpoint to fetch the secrets and stores that in-memory. The server includes an interface where secrets can be configured, and follow the dotnet conventions for subsections.
Note: this server solely should be used for development purposes. While it can be used in production, this is not recommended (as the server is single-threaded and multiple clients that might be fetching the data can be problematic).
For dotnet a NuGet package is exposed: DontCommitSecrets. To add the server to your
Personally, I am only adding this source when running within a development environment, to prevent a production machine from fetching data to a non-existent server. To do this, add the NuGet package like so in your .csproj file:
<ItemGroup Condition="'$(Configuration)' == 'Debug'"> <PackageReference Include="DontCommitSecrets" Version="0.0.1" /> </ItemGroup>
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net8.0 is compatible. net8.0-android was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed.|
- Microsoft.Extensions.Configuration (>= 8.0.0)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.