uConfig 1.0.3
dotnet add package uConfig --version 1.0.3
NuGet\Install-Package uConfig -Version 1.0.3
<PackageReference Include="uConfig" Version="1.0.3" />
paket add uConfig --version 1.0.3
#r "nuget: uConfig, 1.0.3"
// Install uConfig as a Cake Addin #addin nuget:?package=uConfig&version=1.0.3 // Install uConfig as a Cake Tool #tool nuget:?package=uConfig&version=1.0.3
uConfig
Overview
uConfig is a plugin for Umbraco CMS that simplifies process of inspecting and managing server's configuration thru a dedicated backoffice dashboard. It features SQL configuration provider for Umbraco database seamlessly intregrated into ASP.NET core architecture by implementing IConfiguration interface and providing modification of configuration values in runtime.
uConfig can be ideal choice under the following circumstances:
- Storage of sensitive data (such as passwords) in code repository considered as security fail.
- Usage of alternative providers (such as Azure KeyVault, AWS Secrets Manager, etc) are not suitable.
- There is no direct access to filesystem nor environment variables.
- Configuration changes required in runtime.
Security
- uConfig uses Umbraco database for storing configuration values.
- Dashboard and API protected with Auth filters and available for users of Admin group only.
- Some values may be additionally protected with value-masking (see Configuration section).
Getting Started
uConfig is available via Nuget, Umbraco Marketplace or GitHub Packages.
Usage:
To enable plugin all you need is to call .AddUConfig()
extention method for your UmbracoBuilder from uConfig
namespace:
using uConfig; // <--Don't forget namespace
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
builder.AddUConfig(); // <--That's all you need!
WebApplication app = builder.Build();
Note: uConfig employs the standard configuration system of .NET Core, which means that the sequence in which sources are added is crucial. It has the capability to override any values that were established prior to it. However, it cannot alter values that are appended subsequent to it (In such cases, the keys will be automatically marked as readonly, see below).
Configuration:
uConfig ships with it's own configuration file uConfigSettings.json
which should appear at your project's root after package installation. This file introduces Umbraco:uConfig
configuration section with 4 sub-keys with default configuration that should cover most of scenarios:
Selected
[String Array of RegEx patterns]: Configuration key will be selected for displaying if it matches any of them. All keys will be selected if empty. Default value:[ "^ConnectionStrings", "^Umbraco" ]
- everything that starts with Umbraco or ConnectionStrings.Excluded
[String Array of RegEx patterns]: Configuration key will be excluded from selection if it matches any of them. None of keys will be filtered if empty. Default value:[ "^Umbraco:uConfig" ]
- uConfig's configuration.Readonly
[String Array of RegEx patterns]: Configuration key will be marked as "Readonly" (no ability to change thru uConfig's dashboard) if it matches any of them. Default value:[ "^ConnectionStrings" ]
- everything that starts with ConnectionStrings.Protected
[String Array of RegEx patterns]: Configuration key will be marked as "Protected" (value will be masked with '•' during viewing or editing) if it matches any of them. Default value:[ "^ConnectionStrings", "Password$" ]
- all keys that starts with ConnetionStrings or ends with Password.
Custom Configuration
If your configuration includes additional nodes and you want to show/edit them thru the dashboard you may edit this configuration file. Due to nuget specific of package delivering uConfigSettings.json
file may be set to readonly in your project after plugin installation because it was added from nuget's cache folder. It's recommended to replace it with local copy with same name and desired content in that case.
Contributing
We welcome contributions from the community. If you'd like to contribute, please fork the main branch and contact us for a pull request.
License
uConfig is released under the MIT License. See the LICENSE file for more details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.5)
- Umbraco.Cms.Persistence.EFCore (>= 13.3.0)
- Umbraco.Cms.Web.BackOffice (>= 13.3.0)
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 |
---|---|---|
1.0.3 | 139 | 5/15/2024 |
### 1.0.3
- Case ignorance added to Regex filters in order to support Umbraco Cloud
### 1.0.2
- Sql Providers names updated in order to support Umbraco Cloud
### 1.0.1
- Minor documentation changes
### 1.0.0
- Sql configuration source and provider
- UI configuration viewer and editor