tnc1997 / azure-app-configuration-emulator Goto Github PK
View Code? Open in Web Editor NEWPlease note that Emulator for Azure App Configuration is unofficial and not endorsed by Microsoft.
License: MIT License
Please note that Emulator for Azure App Configuration is unofficial and not endorsed by Microsoft.
License: MIT License
Is your feature request related to a problem? Please describe.
I would like the emulator to publish events when configuration settings are deleted or modified.
Describe the solution you'd like
I would like Emulator for Azure App Configuration to be integrated with Azure Event Grid.
Describe alternatives you've considered
I have not considered any alternatives to Azure Event Grid.
Describe the bug
The SqliteDbParameterFactory
is incorrectly serializing configuration setting tags as dictionary ToString
e.g.
System.Collections.Generic.Dictionary`2[System.String,System.String]
Current behavior
Steps to reproduce the behavior:
Expected behavior
The configuration setting tags should be serialized as a JSON object.
Additional context
My primary use case for you project is automated testing where my test environment is managed via Testcontainers. Unfortunately, this tool does not support (as far as I can tell) using a git URL for the container build context as your do in the docker-compose snippet of your README.md
. For my use case, it would be valuable to reference an image in a OCI-complaint registry (such as github container registry).
If you endorse this effort, I would be happy to make create a PR which builds and publishes an image via github actions.
Is your feature request related to a problem? Please describe.
It is currently not possible to import configuration settings from Azure App Configuration via the UI.
Describe the solution you'd like
I would like to be able to import configuration settings from Azure App Configuration.
Describe alternatives you've considered
I am able to export configuration settings to a JSON file and then import configuration settings from the JSON file.
Is your feature request related to a problem? Please describe.
It is currently not possible to enable nor disable a feature flag via the UI.
Describe the solution you'd like
I would like to be able to enable and disable a feature flag.
Describe alternatives you've considered
I am able to manually enable and disable a feature flag via the API.
Is your feature request related to a problem? Please describe.
As a user I would like to get historical configuration setting data.
Describe the solution you'd like
The relevant actions should accept the Accept-Datetime
header.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-keys#time-based-access
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#time-based-access
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-labels#time-based-access
Is your feature request related to a problem? Please describe.
As a user I would like to lock a configuration setting.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-locks#lock-key-value
Is your feature request related to a problem? Please describe.
As a user I would like to create and/or update configuration settings.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#set-key
It would be very convenient to be able to import configuration from a file on startup to facilitate testing. This would avoid the need to write custom code to seed the emulator with configuration prior to running my test cases.
Is your feature request related to a problem? Please describe.
As a user I would like to list configuration setting keys.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-keys#list-keys
Is your feature request related to a problem? Please describe.
As a user I would like to unlock a configuration setting.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-locks#unlock-key-value
Is your feature request related to a problem? Please describe.
I would like to be able to view metrics and traces using OpenTelemetry.
Describe the solution you'd like
I would like Emulator for Azure App Configuration to be integrated with OpenTelemetry.
Describe alternatives you've considered
I have not considered any alternatives to OpenTelemetry.
Is your feature request related to a problem? Please describe.
As a user I would like to get a configuration setting.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#get-key-value
My organization has many applications which are configured/restricted to use only Azure Entra (Specifically client secret) authentication when accessing any Azure service. We strive to test our applications in as similar an environment as productions as is possible without creating test-only code paths. Thus, it would be beneficial to authenticate with your app configuration emulator either using Entra auth or to be able to disable authentication requirements entirely.
Is your feature request related to a problem? Please describe.
As a user I would like historical configuration settings to be stored in the database.
Describe the solution you'd like
The ApplicationDbContext
should contain a ConfigurationSettingRevisions
property.
The table should be populated by the methods in the ConfigurationSettingRepository
.
Is your feature request related to a problem? Please describe.
This is a proposal for adding a front-end UI to this project, to more easily manage configuration settings and feature flags with the local emulator.
Describe the solution you'd like
My current use case involves configuration settings being set in the Azure Portal UI in Configuration Explorer (or the Feature Flags view), including frequently changing their values to test them, so it is a bit burdensome to have to set these manually in the emulator via Postman and such. I'd love to have a front-end UI (probably accessible from the root URL of the app) so that I can easily toggle feature flags and configuration settings.
I think this could be done entirely in JS, with no server-side .NET code needed. It could have a credential/secret input that builds the authentication headers entirely client-side. This also could enable a future enhancement of specifying a target URL, to even use this against a live Azure App Config instance, to verify that it works properly, or even enable other potential use cases around having a local, debuggable remote configuration UI for Azure App Config, or enable sync from Azure App Config to your local emulator.
At a minimum, this should have all the basic Configuration Explorer functionality from the portal, such as creating/updating/deleting config settings with labels, as well as the Feature Manager functionality of creating/editing/deleting and toggling feature flags with labels. My use case also needs administration of feature flag filters (like the targeting filter), but I accept that that could be a separate future enhancement.
Describe alternatives you've considered
Postman, building an internal custom admin UI for my use case
Additional context
I have limited bandwidth at the moment but I could help get this initiative started, if that sounds good to @tnc1997. I would probably default to using the latest Angular/Material on this just because I know it like the back of my hand, but if someone else has different opinions on how it should be done, I can help contribute once they get the architecture started.
Is your feature request related to a problem? Please describe.
As a user I would like to list configuration setting labels.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-labels#list-labels
Is your feature request related to a problem? Please describe.
It is currently not possible to edit a configuration setting via the UI.
Describe the solution you'd like
I would like to be able to edit a configuration setting.
Describe alternatives you've considered
I am able to "edit" a configuration setting by deleting it and then recreating it.
Describe the bug
Duplicate keys and labels are repeated in the response items
array with regards to #4 and #5.
Current behavior
items
array.Expected behavior
Only distinct keys and labels are returned in the response items
array.
Is your feature request related to a problem? Please describe.
As a developer I would like to store configuration settings in a SQLite database using Entity Framework Core.
Is your feature request related to a problem? Please describe.
The emulator currently uses HTTP which is incompatible with Azure App Configuration which requires HTTPS.
Additional context
The implementation should include native support for running the emulator in a Docker container using HTTPS.
Describe the bug
Attempted to recreate some HTTP calls that work with the real Azure App Config API, like PUT'ing a feature flag, and it fails with a 404 if the key in the URL contains a slash. Feature flags have a key prefix of .appconfig.featureflag/
so the URL is like /kv/.appconfig.featureflag/MyFlagName
Note that the solution is not to URL encode the slash, as that does not match the behavior of Azure App Config.
Current behavior
Steps to reproduce the behavior:
PUT /kv/.appconfig.featureflag/MyFlagName
with a valid feature flag body (see below)Example feature flag body:
{
"key": ".appconfig.featureflag/MyFlagName",
"label": null,
"content_type": "application/vnd.microsoft.appconfig.ff+json;charset=utf-8",
"value": "{\"id\":\"MyFlagName\",\"description\":\"\",\"enabled\":true,\"conditions\":{\"client_filters\":[{\"name\":\"Microsoft.Targeting\",\"parameters\":{\"Audience\":{\"Users\":[],\"Groups\":[],\"DefaultRolloutPercentage\":0}}}]}}",
"tags": {}
}
Expected behavior
200 OK result
Screenshots
N/A
Additional context
I will attempt to fix this problem and submit a PR.
Is your feature request related to a problem? Please describe.
As a user I would like to select the configuration setting fields to be returned in the response.
Describe the solution you'd like
The relevant actions should accept the $select
query parameter.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#request-specific-fields
Describe the bug
The entity tag header and last modified header are missing from the KeyValueResult
.
Current behavior
Steps to reproduce the behavior:
Expected behavior
The KeyValueResult
should include the entity tag header and the last modified header.
Is your feature request related to a problem? Please describe.
As a user I would like to list configuration settings.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#list-key-values
Is your feature request related to a problem? Please describe.
It is currently not possible to create a feature flag via the UI.
Describe the solution you'd like
I would like to be able to create a feature flag.
Describe alternatives you've considered
I am able to manually create a feature flag via the API.
Describe the bug
The last modified and entity tag properties are not being updated when updating a configuration setting.
Current behavior
Steps to reproduce the behavior:
Expected behavior
The last modified and entity tag properties should be updated.
Describe the bug
The entity tag property is not being encoded correctly when a configuration setting is added or updated.
Current behavior
Steps to reproduce the behavior:
Expected behavior
The entity tag property should be encoded as a Base64 string instead of a UTF-8 string.
Is your feature request related to a problem? Please describe.
The logic that is applied to handler inputs is currently not covered by unit tests although it should be.
Describe the solution you'd like
I would like to see unit tests added that cover the different possible combinations of handler inputs.
It would be valuable to support a Testcontainers module to quickly enable integration tests dependant on azure-app-configuration-emulator.
Testcontainers is a popular library use for defining and managing complex container environments for integration testing. This library introduces the concept of a module as an extension library which enables complex automatic configuration and best practices when integrating specific 3rd-party applications.
Although the Testcontainers project provides modules for many commonly used applications, other projects (such as WireMock.Net) provide their own Testcontainers modules.
The features I would like in this module:
Describe the bug
Labels returned from the list labels endpoint do not have nulls normalized.
Current behavior
Expected behavior
Labels returned from the list labels endpoint should either be a value of type string or null.
I see that the project is made up of quite a few libraries which all get referenced by the main application.
Many of these libraries:
You might consider collapsing some of these libraries into one or even into the main application. This would serve to:
On that note, nice work on a great project! ๐ Cheers!
Is your feature request related to a problem? Please describe.
As a developer I would like to install Emulator for Azure App Configuration on my Windows device.
Describe the solution you'd like
I would like a Windows installer to be distributed with each release.
Describe alternatives you've considered
Emulator for Azure App Configuration can be pulled from Docker Hub and then run in a container.
Is your feature request related to a problem? Please describe.
As a user I would like to execute relevant actions conditionally using entity tags and the associated headers.
Describe the solution you'd like
The ConfigurationSetting
class should contain an ETag
property.
The relevant actions should accept the If-Match
and If-None-Match
headers.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#get-conditionally
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#set-key-conditionally
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#delete-key-conditionally
Describe the bug
When the configuration setting tags property is null
it is incorrectly serialized as null
instead of an empty object.
Current behavior
Steps to reproduce the behavior:
null
tags property.Expected behavior
When the configuration setting tags property is null
it should be serialized as an empty object.
Additional context
Azure.Data.AppConfigurationConfigurationServiceSerializer.ReadPropertyValue
Is your feature request related to a problem? Please describe.
As a user I would like to delete a configuration setting.
Additional context
https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-key-value#delete
Describe the bug
The configuration setting SetInput
is being incorrectly deserialized from pascal case keys instead of snake case keys.
Additional context
https://github.com/tnc1997/azure-app-configuration-emulator/pull/65/files#diff-60945010d016ec76710f2d94ce5566cb97dc51ae6da38567690ad47cc71ac977
Is your feature request related to a problem? Please describe.
It is currently not possible to import configuration settings from a JSON file via the UI.
Describe the solution you'd like
I would like to be able to import configuration settings from a JSON file.
Describe alternatives you've considered
I am able to manually "import" configuration settings one at a time via the API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.