SecureConfigurationManagerTConfig Class

Manages the loading and saving of configurations while enforcing permission checks, and redacting/restoring sensitive settings when displaying/saving them.

Definition

Namespace: MFiles.VAF.Configuration
Assembly: MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 23.12.13247.3
C#
public class SecureConfigurationManager<TConfig>
where TConfig : class, new()
Inheritance
Object    SecureConfigurationManagerTConfig

Type Parameters

TConfig
The type of configuration class this instance manages.

Constructors

Properties

Key Key where the configuration is stored in the Namespace.
Namespace Namespace in NVS where the configuration is stored.
ResourceManager Resource manager to use for the configuration when generating it's schema.
Security Security settings to enforce for the TConfig instance and references.
Storage The storage manager of the configuration.

Methods

Deserialize Deserializes a configuration text into an object.
GetSchema Resolves a schema for the configuration class based on the user's security level.
Load Loads the configuration object from storage.
LoadRedactedText(IConfigurationRequestContext) Loads the configuration text so that is safe to show in MFAdmin. All password fields will be redacted. As a safety precaution, this method Throws an exception if the configuration is not valid json, and user is not a sysadmin. This is the only way to ensure non-sysadmins do not see sensitive information.
LoadRedactedText(Vault, SecurityAttributeUserLevel) Loads the configuration text so that is safe to show in MFAdmin. All password fields will be redacted. As a safety precaution, this method Throws an exception if the configuration is not valid json, and user is not a sysadmin. This is the only way to ensure non-sysadmins do not see sensitive information.
LoadText Load the configuration text from storage.
Save Saves the raw configuration text to storage.
SaveRedactedText(IConfigurationRequestContext, String) Saves a configuration text, ensuring that: 1. It is valid json (parseable). 2. No settings were modified that should be restricted for the current user. 3. Any passwords that were redacted when provided to the user, are restored first. If previous version cannot be parsed, no passwords would have been redacted, so this check isn't done, However, we would not have provided the unparseable text to vaultAdmins, so we don't allow them to save in this situation either.
SaveRedactedText(Vault, SecurityAttributeUserLevel, String) Saves a configuration text, ensuring that: 1. It is valid json (parseable). 2. No settings were modified that should be restricted for the current user. 3. Any passwords that were redacted when provided to the user, are restored first. If previous version cannot be parsed, no passwords would have been redacted, so this check isn't done, However, we would not have provided the unparseable text to vaultAdmins, so we don't allow them to save in this situation either.
Serialize Serializes a configuration object into text.

See Also