Configuration

This manual explains how to set up local configuration files to override settings for Quino applications and tests. For a more in-depth description of how the configuration system works an how your application can extend it, see Configuration System.

This helps local installations:

  • Set up custom database parameters
  • Configure custom local paths

Overview

Quino applications usually have a configuration file called data-configuration.xml or main-configuration.xml.

Configure Database

To give you an idea of the possibilities, the configuration sample below has the following characteristics:

  • Provides configuration for two databases
  • Selects "SqlServer" by default
  • "SqlServer" uses the local SQL Express with integrated Windows authentication (which is why user/password are empty)
  • "PostgreSql" uses a plaintext password (see encrypting passwords below)
<?xml version="1.0" encoding="utf-8" ?>
<config>
  <connectionSettingsGroups>
    <servers>
      <default>SqlServer</default>
      <PostgreSql>
        <title>PostgreSql on localhost</title>
        <typename>Encodo.Quino.Data.PostgreSql.PostgreSqlMetaDatabase, Quino.Data.PostgreSql</typename>
        <hostname>localhost</hostname>
        <resource>CRM</resource>
        <username>quino</username>
        <password>m</password>
        <passwordencryptiontype>None</passwordencryptiontype>
      </PostgreSql>
      <SqlServer>
        <title>Sql Server Express</title>
        <typename>Encodo.Quino.Data.SqlServer.SqlServerMetaDatabase, Quino.Data.SqlServer</typename>
        <hostname>.\SQLEXPRESS</hostname>
        <resource>CRM</resource>
      </SqlServer>
    </servers>
  </connectionSettingsGroups>
</config>

Encrypting passwords

Use the quino password command to encrypt passwords with the static password-encryption type.

  • Let's say we have the password "123456"
  • Run quino password and enter the password
  • Copy the result ("HjZ+grfrb/1GSHLeyToxYQ==" in this case)
  • Enter the value in your configuration

Overlays

The sample above is a full configuration file. You will mostly be working with an "overlay" file. That is, a file that is applied on top of the standard configuration.

To set an encrypted password, for example, your file only needs:

<?xml version="1.0" encoding="utf-8" ?>
<config>
  <connectionSettingsGroups>
    <servers>
      <PostgreSql>
        <password>HjZ+grfrb/1GSHLeyToxYQ==</password>
      </PostgreSql>
    </servers>
  </connectionSettingsGroups>
</config>

To set a plaintext password, for example, your file only needs:

<?xml version="1.0" encoding="utf-8" ?>
<config>
  <connectionSettingsGroups>
    <servers>
      <PostgreSql>
        <password>123456</password>
        <passwordencryptiontype>None</passwordencryptiontype>
      </PostgreSql>
    </servers>
  </connectionSettingsGroups>
</config>
Back to top Generated by DocFX