Skip to content

added de and encryption of config files#672

Draft
chaostrichter wants to merge 3 commits intorelease/3from
feature/EncryptConfigFiles
Draft

added de and encryption of config files#672
chaostrichter wants to merge 3 commits intorelease/3from
feature/EncryptConfigFiles

Conversation

@chaostrichter
Copy link
Collaborator

The config files of the server system will be encrypted with an AES function.

@dbeuchler
Copy link
Member

dbeuchler commented Oct 7, 2025

The encryption mechanism should be fully configurable, including the encryption key, which must not be hardcoded.

To achieve this, it might be better to implement a new version of ConfigManager rather than modifying the existing one. Since AddMoryxKernel and UseMoryxConfigurations are responsible for registering the IConfigManager for the process, they could be adjusted to support this new implementation.

Note: The configuration directory is already adjustable, which aligns well with this approach.

A System Varialbe is needed to activate it.
@chaostrichter chaostrichter marked this pull request as draft October 8, 2025 04:06
@chaostrichter chaostrichter marked this pull request as ready for review October 8, 2025 05:19
@chaostrichter chaostrichter marked this pull request as draft October 8, 2025 09:11
@dbeuchler
Copy link
Member

After discussing with @1nf0rmagician, we’ve identified two possible approaches to address the current issue.


Option 1: Solve in Application

Handle password management directly in your application by:

  • Removing passwords from configuration files
  • Using environment variables, or
  • Implementing a helper class that retrieves passwords from a secret manager (e.g., Windows Credential Manager). The Meziantou.Framework.Win32 package could help you with a one-liner.

Option 2: Simple change in ConfigManager

Since Runtime 3 is no longer supported, no new features should be implemented for it. In this case, the ConfigManager was not changed during last releases, so when a simple cherry-pick is possible in the supported versions, this should be fine.

Extend the ConfigManager to support password retrieval from external sources like environment variables if:

  • The property is decorated with PasswordAttribute
  • The value is empty
  • A specific condition is met

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants