Configuration

Abstracts

Applications based on this frameworks requires to be configured using an appsettings.json file that will contains sections that defines the application desired configuration.

appsettings.json file

Use the appsettings.json to configure framework options as explained below.

Connection strings

Connection strings are configured as a standard .NET configuration.

The connection string names (Default and Host in the following example) must match the name os the DatabaseApis objects defined within the KpokPatagon : Data : DatabaseApis section.

                
{ 
  "ConnectionStrings": { 
    "Default": "<connection-string-configuration>", 
    "Host": "<connection-string-configuration>" 
  }
}
                

Cryptography

The cryptography sections allows to configured the cryptography functionality from KpokPatagon.Security.Cryptography.

                
{
  ...
  "KpokPatagon": {
    "Security": {
      "Cryptography": { 
        "AsymmetricKeyFileName": "<asymmetric-key-file-name>",
        "HashAlgorithmSaltEnabled": true, 
        "SymmetricAlgorithmKeyFileName": "<symmetric-key-file-name>",
        "PreviousSymmetricAlgorithmKeyFileName": "<previous-symmetric-key-file-name>"
      }  
    }
    "Data": { ... }
  }
}
                

Cryptography configuration options

AsymmetricKeyFileName

Specifies the path to a file that contains the keys used for asymmetric encryption.

HashAlgorithmSaltEnabled

Specifies if a Salt is used when hashing information.

SymmetricAlgorithmType

Specifies the type of the symmetric algorithm to use for encryption as a qualified type name. If nothing is provided Aes algorithm is used.

PreviousSymmetricAlgorithmKeyFileName

Specifies the path to a file that contains the key used previously for symmetric encryption.