{
  "form": [
    {
      "sectionName": "Connection",
      "id": 1,
      "children": [
        {
          "label": "Connection Mode",
          "configProperty": "datasourceConfiguration.connection.mode",
          "controlType": "DROP_DOWN",
          "isRequired": true,
          "initialValue": "READ_WRITE",
          "options": [
            {
              "label": "Read Only",
              "value": "READ_ONLY"
            },
            {
              "label": "Read / Write",
              "value": "READ_WRITE"
            }
          ]
        },
        {
          "sectionName": null,
          "children": [
            {
              "label": "Host Address",
              "configProperty": "datasourceConfiguration.endpoints[*].host",
              "controlType": "KEYVALUE_ARRAY",
              "validationMessage": "Please enter a valid host",
              "validationRegex": "^((?![/:]).)*$"
            },
            {
              "label": "Port",
              "configProperty": "datasourceConfiguration.endpoints[*].port",
              "dataType": "NUMBER",
              "controlType": "KEYVALUE_ARRAY"
            }
          ]
        },
        {
          "label": "Database Name",
          "configProperty": "datasourceConfiguration.authentication.databaseName",
          "controlType": "INPUT_TEXT",
          "placeholderText": "Database name",
          "initialValue": "admin"
        }
      ]
    },
    {
      "sectionName": "Authentication",
      "id": 2,
      "children": [
        {
          "sectionName": null,
          "children": [
            {
              "label": "Username",
              "configProperty": "datasourceConfiguration.authentication.username",
              "controlType": "INPUT_TEXT",
              "placeholderText": "Username"
            },
            {
              "label": "Password",
              "configProperty": "datasourceConfiguration.authentication.password",
              "dataType": "PASSWORD",
              "controlType": "INPUT_TEXT",
              "placeholderText": "Password",
              "encrypted": true
            }
          ]
        }
      ]
    },
    {
      "id": 3,
      "sectionName": "SSL (optional)",
      "children": [
        {
          "label": "SSL Mode",
          "configProperty": "datasourceConfiguration.connection.ssl.authType",
          "controlType": "DROP_DOWN",
          "options": [
            {
              "label": "No SSL",
              "value": "NO_SSL"
            },
            {
              "label": "Allow",
              "value": "ALLOW"
            },
            {
              "label": "Prefer",
              "value": "PREFER"
            },
            {
              "label": "Require",
              "value": "REQUIRE"
            },
            {
              "label": "Disable",
              "value": "DISABLE"
            },
            {
              "label": "Verify-CA",
              "value": "VERIFY_CA"
            },
            {
              "label": "Verify-Full",
              "value": "VERIFY_FULL"
            }
          ]
        },
        {
          "sectionName": null,
          "children": [
            {
              "label": "Key File",
              "configProperty": "datasourceConfiguration.connection.ssl.keyFile",
              "controlType": "FILE_PICKER"
            },
            {
              "label": "Certificate",
              "configProperty": "datasourceConfiguration.connection.ssl.certificateFile",
              "controlType": "FILE_PICKER"
            }
          ]
        },
        {
          "sectionName": null,
          "children": [
            {
              "label": "CA Certificate",
              "configProperty": "datasourceConfiguration.connection.ssl.caCertificateFile",
              "controlType": "FILE_PICKER"
            },
            {
              "label": "PEM Certificate",
              "configProperty": "datasourceConfiguration.connection.ssl.pemCertificate.file",
              "controlType": "FILE_PICKER"
            },
            {
              "label": "PEM Passphrase",
              "configProperty": "datasourceConfiguration.connection.ssl.pemCertificate.password",
              "dataType": "PASSWORD",
              "controlType": "INPUT_TEXT",
              "placeholderText": "PEM Passphrase"
            }
          ]
        }
      ]
    }
  ]
}
