Schema-cli

Configuration JSON schema

The Create command receives a full configuration JSON template template as an input parameter. All the other commands may work with just the configuratorInformation section.

For all the upcoming sections, settings that are used by an action are marked as (✅) while unused settings are marked as (⬜️).

Configurator Information

The Configurator Information section contains information needed to connect to the (Azure) SQL database server. This section is used for all actions. The Delete, Upgrade, ImportData, and ExportData actions need only this section to run. The Upgrade action may need additional settings though.

JSON template:

Parameters:

Name Data type Required? Default value
databaseServerName string true localhost
databaseLoginUserName string false
databaseLoginUserPassword string false

Corresponding configuration on UI:

Index Name
(1) databaseServerName
(2) databaseLoginUserName
(3) databaseLoginUserPassword

database-configuration

Examples

  • If your database server is installed on localhost, you can leave the databaseServerName setting empty:

    Corresponding configuration on UI:

    configuration-template-1

  • If you want to connect to the SQL server using Windows integrated authentication, you need to leave databaseLoginUserName and databaseLoginUserPassword settings empty:

    Corresponding configuration on UI:

    configuration-template-2

  • If you are using an SQL server installed on another machine which is always the case in production, you need to specify the SQL server name and credentials (or leave the credentials empty if you are using Windows integrated authentication):

    Corresponding configuration on UI:

    configuration-template-3

General information configuration

JSON template:

Parameters:

Name Data type Required? Default value Create Replicate
clientName string true
defaultLanguage string true
tenantId string true ⬜️
passwordAdmin string true ⬜️
safewhereAdminIdleTimeout string false 20 ⬜️

Corresponding configuration on UI:

Index Name
(1) tenantId
(2) clientName
(3) defaultLanguage
(4) passwordAdmin
(5) safewhereAdminIdleTimeout

general-information-configuration-1

Examples

  • Input settings for an instance:

    Corresponding configuration on UI:

general-information-configuration-1

Instance's database connection configuration

JSON template:

Enable multi subnet fail over parameters

Name Data type Required? Default value Create Replicate
isMultiSubnetFailover boolean false false ⬜️

Corresponding configuration on UI:

Index Name
(1) isMultiSubnetFailover

general-configuration-multisubnetfailover

Example

Corresponding configuration on UI:

database-connection-configuration-1

Database configuration parameters

Name Data type Required? Default value Create Replicate
schema string true ⬜️
server string false localhost ⬜️
loginUserName string false false ⬜️
loginPassword string false false
dbAuthenticationType Enum = {SQLServerAuthentication, WindowsAuthentication} false SQLServerAuthentication ⬜️

Corresponding configuration on UI:

Index Name
(1) schema
(2) server
(3) dbAuthenticationType
(4) loginUserName
(5) loginPassword

tenant-database-configuration

Example
  • For SQL database authentication, you do not need to input any information for the loginUserName and loginPassword:

    Corresponding configuration on UI:

    database-connection-configuration-2

  • For Windows authentication, you need to input any information for the loginUserName and loginPassword:

    Corresponding configuration on UI:

    database-connection-configuration-3

Audit configuration parameters

Name Data type Required? Default value Create Replicate
port number false 1433 ⬜️
connectionTimeout number false 60 ⬜️

Corresponding configuration on UI:

Index Name
(1) port
(2) connectionTimeout

tenant-audit-database-configuration

Example

You only need to input information for the port and connectionTimeout, other information such as database server name, username, password will depends on databaseConfiguration object, we use SQLDatabase as audit database provider:

Corresponding configuration on UI:

database-connection-configuration-4

Session state configuration parameters

Name Data type Required? Default value Create Replicate
sessionStateMode Enum = [InProc, SQLServer] false InProc ⬜️
timeOut number false 60 ⬜️

Corresponding configuration on UI:

Index Name
(1) sessionStateMode
(2) timeOut

tenant-session-state-configuration

Example
  • Input value InProc for sessionStateMode:

    Corresponding configuration on UI:

    database-connection-configuration-5

  • Input value SQLServer for sessionStateMode :

    Corresponding configuration on UI:

    database-connection-configuration-6

Instance's IIS configuration

JSON template:

Parameters:

Name Data type Required? Default value Create Replicate
generateDefaultValues boolean false true ⬜️
serverIpAddress string false 127.0.0.1 ⬜️
port number value 443 ⬜️
domainName string true ⬜️
siteName string true ⬜️
sitePool string true ⬜️
adminPool string true ⬜️
runtimePool string true ⬜️
servicePool string true ⬜️
bindCertificate boolean false true ⬜️
requireServerNameIndication boolean false false ⬜️
useHttpSecurityHeaders boolean false true ⬜️

Corresponding configuration on UIs:

Index Name
(1) generateDefaultValues

tenant-database-configuration-auto-generate-values

Index Name
(1) serverIpAddress
(2) port
(3) domainName
(4) bindCertificate
(5) requireServerNameIndication
(6) siteName
(7) sitePool
(8) adminPool
(9) runtimePool
(10) servicePool

tenant-iis-configuration

Index Name
(1) useHttpSecurityHeaders

tenant-iis-configuration-security-headers

Example

  • If generateDefaultValues is true, based on tenantId some settings will auto-generate such as domainName, siteName, sitePool, adminPool, runtimePool, servicePool and default values of bindCertificate, requireServerNameIndication are true:

    Corresponding configuration on UI:

    iis-configuration-1

  • If generateDefaultValues is false, you need to specify values for IIS settings:

    Corresponding configuration on UI:

    iis-configuration-2

  • Set value of useHttpSecurityHeaders to true, if you want to use recommended security headers:

    Corresponding configuration on UI:

    iis-configuration-3

  • Otherwise, set value of useHttpSecurityHeaders to false:

    Corresponding configuration on UI:

    iis-configuration-4

Instance's certificates configuration

JSON template:

Trusted Root CA certificate configuration

Parameters:

Name Data type Required? Default value Create Replicate
pathToTrustedRootCertificateToImport string false ⬜️

Corresponding configuration on UI:

Index Name
(1) pathToTrustedRootCertificateToImport

tenant-ca-certifcates-configuration

Example

Input value for pathToTrustedRootCertificateToImport:

Corresponding configuration on UI:

certificate-configuration-9

SSL certificate configuration parameters

Name Data type Required? Default value Create Replicate
certificateSetupType Enum = {UseDefaultCertificate, UseAutoGeneratedCertificate, ImportFromFile, SelectFromServerCertificateStore} false UseDefaultCertificate ⬜️
sslDomainName string false "safewhere.local" ⬜️
filePath string false ⬜️
password string false ⬜️
certificateThumbprintInStore string false ⬜️

Corresponding configuration on UI:

Index Name
(1.1) certificateSetupType = UseDefaultCertificate
(1.2) certificateSetupType = UseAutoGeneratedCertificate
(1.3) certificateSetupType = ImportFromFile
(1.4) certificateSetupType = SelectFromServerCertificateStore
(2) sslDomainName
(3) filePath
(4) password
(5) certificateThumbprintInStore

tenant-ssl-certifcate-configuration

Example
  • If certificateSetupType = UseDefaultCertificate, you don't need to input values for other settings:

    Corresponding configuration on UI:

    certificate-configuration-1

  • If certificateSetupType = UseAutoGeneratedCertificate, you need to input value for sslDomainName:

    Corresponding configuration on UI:

    certificate-configuration-2

  • If certificateSetupType = ImportFromFile, you need to input values for filePath and password:

    Corresponding configuration on UI:

    certificate-configuration-3

  • If certificateSetupType = SelectFromServerCertificateStore, you need to input values for certificateThumbprintInStore:

    Corresponding configuration on UI:

    certificate-configuration-4

Signing certificate configuration parameters

Name Data type Required? Default value Create Replicate
certificateSetupType Enum = {UseDefaultCertificate, UseAutoGeneratedCertificate, ImportFromFile, SelectFromServerCertificateStore} false UseDefaultCertificate ⬜️
filePath string false ⬜️
password string false ⬜️
certificateThumbprintInStore string false ⬜️

Corresponding configuration on UI:

Index Name
(1.1) certificateSetupType = UseDefaultCertificate
(1.2) certificateSetupType = UseAutoGeneratedCertificate
(1.3) certificateSetupType = ImportFromFile
(1.4) certificateSetupType = SelectFromServerCertificateStore
(2) filePath
(3) password
(4) certificateThumbprintInStore

tenant-signing-certifcates-configuration

Example
  • If certificateSetupType = UseDefaultCertificate, you don't need to input values for other settings:

    Corresponding configuration on UI:

    certificate-configuration-5

  • If certificateSetupType = UseAutoGeneratedCertificate, you don't need to input values for other settings:

    Corresponding configuration on UI:

    certificate-configuration-6

  • If certificateSetupType = ImportFromFile, you need to input values for filePath and password:

    Corresponding configuration on UI:

    certificate-configuration-7

  • If certificateSetupType = SelectFromServerCertificateStore, you need to input values for certificateThumbprintInStore:

    Corresponding configuration on UI:

    certificate-configuration-8