Overactiveminds.Configureoo
0.0.34-alpha
dotnet add package Overactiveminds.Configureoo --version 0.0.34-alpha
NuGet\Install-Package Overactiveminds.Configureoo -Version 0.0.34-alpha
<PackageReference Include="Overactiveminds.Configureoo" Version="0.0.34-alpha" />
paket add Overactiveminds.Configureoo --version 0.0.34-alpha
#r "nuget: Overactiveminds.Configureoo, 0.0.34-alpha"
// Install Overactiveminds.Configureoo as a Cake Addin
#addin nuget:?package=Overactiveminds.Configureoo&version=0.0.34-alpha&prerelease
// Install Overactiveminds.Configureoo as a Cake Tool
#tool nuget:?package=Overactiveminds.Configureoo&version=0.0.34-alpha&prerelease
As the DevOps community move towards source control as the single source of truth for storing code, infrastructure and configuration some teams will face resistance due to security concerns around storing sensitive config values in source control. Configureoo attempts to address that by providing easy to use encryption of specific values in configration which can then safely be stored in version control (even open source projects).
In a nutshell, you first setup a key and store that key in an environment variable by invoking:
Configureoo -k default
This command will create a 128 bit random key and store it in the environment variable CONFIGUREOO_default. You can then enter values into a configuration file (e.g. appsettings.json) in the Configuroo format for example:
{
"someSensitiveValue": "<CFGO>some private key</CFGO>",
"someNonSensitiveValue": "Some other value"
}
Then invoking:
Configureoo encrypt -f appsettings.json
Results in a file similar to:
{
"someSensitiveValue": "<CFGO>XFgySLm78ezB3OTwbNp1fpTnLN2ewI+SnPVQZqTxxd6GlTwL/UhDiJnALc5eGcHN</CFGO>",
"someNonSensitiveValue": "Some other value"
}
You can then commit this file to source control.
Decrytping the data is acheived by first setting the same environment variable on the box / image / server running your dependent code and then load it via the Overactiveminds.Configureoo.JsonConfigurationProvider. Simply call the AddConfigureooJsonFile extension method when initializing configuration instead of the normal AddJsonFile and Configureoo will decrypt the sensitive values and present them to your application in via normal configuration.
When it's time to edit the sensitive value, simply call:
Configureoo decrypt -f appsettings.json
Make your edit, then call:
Configureoo encrypt -f appsettings.json
And commit the change.
Sounds like a pain, can it be made any easier?
Yes - in fact there's already an experimental Visual Studio Plugin that allows you to simply right click on a file in Solution Explorer and select "Configureoo -> Encrypt / Decrypt" so you can make changes to sensitive values whilst editing code.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser 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. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Framework | net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETCoreApp 2.0
- Microsoft.Extensions.CommandLineUtils (>= 1.1.1)
- Microsoft.NETCore.App (>= 2.0.0)
- Overactiveminds.Configureoo.Core (>= 0.0.34-alpha)
- Overactiveminds.Configureoo.KeyStore.EnvironmentVariables (>= 0.0.34-alpha)
-
.NETFramework 4.7
- Microsoft.Extensions.CommandLineUtils (>= 1.1.1)
- Overactiveminds.Configureoo.Core (>= 0.0.34-alpha)
- Overactiveminds.Configureoo.KeyStore.EnvironmentVariables (>= 0.0.34-alpha)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|