ToolJet/plugins/packages/mongodb/lib/manifest.json
Siddharth Pundir acc491033a
Feat/pgsql mongo ssh and db improvements (#15367)
* PgSQL ssh implementations and other improvements

* Updated the package.json

* Mongo db ssh implementation and improvements

* Updated the helper text and database label

* Updated the helper text for password

* Fixing the autofetch for the mongo

* Fixing autofetch for the pgsql

* Updated the ssl toggle title

* Updated the common toggle logic

* Bump version to 3.20.114-lts across all components

---------

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2026-03-05 20:49:57 +05:30

653 lines
No EOL
19 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
"title": "Mongodb datasource",
"description": "A schema defining mongodb datasource",
"type": "object",
"tj:version": "1.0.0",
"tj:source": {
"name": "MongoDB",
"kind": "mongodb",
"type": "database"
},
"properties": {
"connection_type": {
"type": "string",
"title": "Connection type",
"description": "Single select dropdown for connection_type",
"enum": ["manual", "string"],
"default": "manual"
},
"connection_string": {
"type": "string",
"title": "Connection string",
"description": "mongodb://admin:SecureP@ss2024!prod-db-1.company.com:27017/customer_data",
"encrypted" : true
},
"connection_format": {
"type": "string",
"title": "Connection format",
"description": "Select the connection protocol format",
"enum": ["mongodb", "mongodb+srv"],
"default": "mongodb"
},
"host": {
"type": "string",
"title": "Host"
},
"port": {
"type": "number",
"title": "Port",
"default": 27017
},
"database": {
"type": "string",
"title": "Database name"
},
"username": {
"type": "string",
"title": "Username",
"description": "Enter username"
},
"password": {
"type": "string",
"title": "Password"
},
"use_ssl": {
"type": "string",
"title": "SSL/TLS",
"description": "Connect using SSL/TLS",
"enum": ["enabled", "disabled"],
"default": "disabled"
},
"tls_certificate": {
"type": "string",
"title": "SSL/TLS certificate",
"description": "Single select dropdown for choosing certificates",
"enum": ["ca_certificate", "client_certificate", "none"],
"default": "none"
},
"ca_cert": {
"type": "string",
"title": "CA cert",
"description": "Enter CA certificate"
},
"client_key": {
"type": "string",
"title": "Client key",
"description": "Enter client key"
},
"client_cert": {
"type": "string",
"title": "Client cert",
"description": "Enter client certificate"
},
"ssh_enabled": {
"type": "string",
"title": "SSH Tunnel",
"description": "Connect through an SSH server",
"enum": ["enabled", "disabled"],
"default": "disabled"
},
"ssh_host": {
"type": "string",
"title": "SSH Host"
},
"ssh_port": {
"type": "number",
"title": "SSH Port",
"default": 22
},
"ssh_username": {
"type": "string",
"title": "SSH Username"
},
"ssh_auth_type": {
"type": "string",
"title": "SSH Authentication Type",
"enum": ["private_key", "password"],
"default": "private_key"
},
"ssh_private_key": {
"type": "string",
"title": "SSH Private Key"
},
"ssh_password": {
"type": "string",
"title": "SSH Password"
},
"ssh_passphrase": {
"type": "string",
"title": "SSH Passphrase"
},
"ssh_dst_host": {
"type": "string",
"title": "MongoDB Host (via SSH)"
}
},
"tj:encrypted": [
"password",
"ca_cert",
"client_key",
"client_cert",
"connection_string",
"ssh_private_key",
"ssh_password",
"ssh_passphrase"
],
"required": ["connection_type"],
"allOf": [
{
"if": {
"properties": {
"connection_type": { "const": "manual" }
}
},
"then": {
"required": ["host"],
"allOf": [
{
"if": {
"properties": {
"connection_format": { "const": "mongodb" }
}
},
"then": {
"required": ["port"]
}
},
{
"if": {
"properties": {
"use_ssl": { "const": "enabled" }
}
},
"then": {
"required": ["tls_certificate"],
"allOf": [
{
"if": {
"properties": {
"tls_certificate": { "const": "ca_certificate" }
}
},
"then": { "required": ["ca_cert"] }
},
{
"if": {
"properties": {
"tls_certificate": { "const": "client_certificate" }
}
},
"then": { "required": ["client_key", "client_cert", "ca_cert"] }
}
]
}
}
]
}
},
{
"if": {
"properties": {
"connection_type": {
"const": "string"
}
}
},
"then": {
"required": ["connection_string"]
}
},
{
"if": {
"properties": {
"ssh_enabled": { "const": "enabled" }
}
},
"then": {
"required": ["ssh_host", "ssh_port", "ssh_username", "ssh_auth_type"]
}
}
],
"tj:ui:properties": {
"connection_type": {
"order": 1,
"$ref": "#/properties/connection_type",
"key": "connection_type",
"label": "Connection type",
"description": "Single select dropdown for connection_type",
"widget": "dropdown-component-flip",
"list": [
{
"name": "Manual connection",
"value": "manual"
},
{
"name": "Connect using connection string",
"value": "string"
}
]
},
"manual": {
"connection_format": {
"order": 10,
"$ref": "#/properties/connection_format",
"key": "connection_format",
"label": "Connection format",
"description": "Select the connection protocol format",
"widget": "dropdown-component-flip",
"list": [
{ "name": "Standard (mongodb)", "value": "mongodb" },
{ "name": "DNS Seed list (mongodb+srv)", "value": "mongodb+srv" }
],
"mongodb": {
"port": {
"order": 30,
"$ref": "#/properties/port",
"key": "port",
"label": "Port",
"description": "Enter port",
"widget": "text-v3",
"required": true
}
},
"mongodb+srv": {}
},
"host": {
"order": 20,
"$ref": "#/properties/host",
"key": "host",
"label": "Host",
"description": "Enter host",
"widget": "text-v3",
"required": true
},
"database": {
"order": 40,
"$ref": "#/properties/database",
"key": "database",
"label": "Database",
"description": "Enter name of the database",
"widget": "text-v3"
},
"username": {
"order": 50,
"$ref": "#/properties/username",
"key": "username",
"label": "Username",
"description": "Enter username",
"widget": "text-v3"
},
"password": {
"order": 60,
"$ref": "#/properties/password",
"key": "password",
"label": "Password",
"description": "Enter password",
"widget": "password-v3",
"help_text": "Supports secrets (e.g.,{{secrets.db_password}})"
},
"use_ssl": {
"order": 70,
"$ref": "#/properties/use_ssl",
"key": "use_ssl",
"label": "SSL/TLS",
"description": "Connect using SSL/TLS",
"help_text": "Enable encrypted connections to MongoDB server",
"widget": "toggle-flip",
"default": "disabled",
"enabled": {
"tls_certificate": {
"order": 80,
"$ref": "#/properties/tls_certificate",
"key": "tls_certificate",
"label": "SSL/TLS certificate",
"description": "Single select dropdown for choosing certificates",
"widget": "dropdown-component-flip",
"list": [
{ "value": "ca_certificate", "name": "CA certificate" },
{ "value": "client_certificate", "name": "Client certificate" },
{ "value": "none", "name": "None" }
]
},
"ca_certificate": {
"ca_cert": {
"order": 90,
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"label": "CA cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
},
"client_certificate": {
"client_key": {
"order": 90,
"$ref": "#/properties/client_key",
"key": "client_key",
"label": "Client key",
"description": "Enter client key",
"widget": "password-v3-textarea"
},
"client_cert": {
"order": 100,
"$ref": "#/properties/client_cert",
"key": "client_cert",
"label": "Client cert",
"description": "Enter client certificate",
"widget": "password-v3-textarea"
},
"ca_cert": {
"order": 110,
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"label": "CA cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
},
"none": {}
},
"disabled": {}
},
"ssh_enabled": {
"order": 120,
"$ref": "#/properties/ssh_enabled",
"key": "ssh_enabled",
"label": "SSH tunnel",
"description": "Connect through an SSH server",
"help_text": "Connect through an SSH server to access databases in private networks",
"widget": "toggle-flip",
"default": "disabled",
"enabled": {
"ssh_host": {
"order": 130,
"$ref": "#/properties/ssh_host",
"key": "ssh_host",
"label": "SSH host",
"description": "ssh.example.com",
"widget": "text-v3",
"help_text": "SSH server hostname or IP address"
},
"ssh_port": {
"order": 140,
"$ref": "#/properties/ssh_port",
"key": "ssh_port",
"label": "SSH port",
"description": "22",
"help_text": "Default SSH port is 22",
"widget": "text-v3"
},
"ssh_username": {
"order": 150,
"$ref": "#/properties/ssh_username",
"key": "ssh_username",
"label": "SSH username",
"description": "SSH Username",
"widget": "text-v3"
},
"ssh_dst_host": {
"order": 155,
"$ref": "#/properties/ssh_dst_host",
"key": "ssh_dst_host",
"label": "SSH dst host",
"description": "localhost",
"widget": "text-v3"
},
"ssh_auth_type": {
"order": 160,
"$ref": "#/properties/ssh_auth_type",
"key": "ssh_auth_type",
"label": "Authentication type",
"widget": "dropdown-component-flip",
"default": "private_key",
"list": [
{ "value": "private_key", "name": "Private Key" },
{ "value": "password", "name": "Password" }
]
},
"private_key": {
"ssh_private_key": {
"order": 170,
"$ref": "#/properties/ssh_private_key",
"key": "ssh_private_key",
"label": "SSH private key",
"widget": "password-v3-textarea"
},
"ssh_passphrase": {
"order": 180,
"$ref": "#/properties/ssh_passphrase",
"key": "ssh_passphrase",
"label": "SSH passphrase",
"widget": "password-v3"
}
},
"password": {
"ssh_password": {
"order": 170,
"$ref": "#/properties/ssh_password",
"key": "ssh_password",
"label": "SSH password",
"widget": "password-v3"
}
}
},
"disabled": {}
}
},
"string": {
"connection_string": {
"order": 2,
"$ref": "#/properties/connection_string",
"key": "connection_string",
"label": "Connection string",
"description": "mongodb://username:password@hostname:port/database",
"widget": "password-v3-textarea",
"required": true
},
"connection_format": {
"order": 10,
"$ref": "#/properties/connection_format",
"key": "connection_format",
"label": "Connection format",
"description": "Select the connection protocol format",
"widget": "dropdown-component-flip",
"list": [
{ "name": "Standard (mongodb)", "value": "mongodb" },
{ "name": "DNS Seed list (mongodb+srv)", "value": "mongodb+srv" }
],
"mongodb": {
"port": {
"order": 30,
"$ref": "#/properties/port",
"key": "port",
"label": "Port",
"description": "Enter port",
"widget": "text-v3"
}
},
"mongodb+srv": {}
},
"host": {
"order": 20,
"$ref": "#/properties/host",
"key": "host",
"label": "Host",
"description": "Enter host",
"widget": "text-v3"
},
"database": {
"order": 40,
"$ref": "#/properties/database",
"key": "database",
"label": "Database",
"description": "Name of the database",
"widget": "text-v3"
},
"username": {
"order": 50,
"$ref": "#/properties/username",
"key": "username",
"label": "Username",
"description": "Enter username",
"widget": "text-v3"
},
"password": {
"order": 60,
"$ref": "#/properties/password",
"key": "password",
"label": "Password",
"description": "Enter password",
"widget": "password-v3",
"help_text": "Supports secrets (e.g.,{{secrets.db_password}})"
},
"use_ssl": {
"order": 70,
"$ref": "#/properties/use_ssl",
"key": "use_ssl",
"label": "SSL/TLS",
"description": "Connect using SSL/TLS",
"help_text": "Enable encrypted connections to MongoDB server",
"widget": "toggle-flip",
"default": "disabled",
"enabled": {
"tls_certificate": {
"order": 80,
"$ref": "#/properties/tls_certificate",
"key": "tls_certificate",
"label": "SSL/TLS certificate",
"description": "Single select dropdown for choosing certificates",
"widget": "dropdown-component-flip",
"list": [
{ "value": "ca_certificate", "name": "CA certificate" },
{ "value": "client_certificate", "name": "Client certificate" },
{ "value": "none", "name": "None" }
],
"ca_certificate": {
"ca_cert": {
"order": 90,
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"label": "CA cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
},
"client_certificate": {
"client_key": {
"order": 90,
"$ref": "#/properties/client_key",
"key": "client_key",
"label": "Client key",
"description": "Enter client key",
"widget": "password-v3-textarea"
},
"client_cert": {
"order": 100,
"$ref": "#/properties/client_cert",
"key": "client_cert",
"label": "Client cert",
"description": "Enter client certificate",
"widget": "password-v3-textarea"
},
"ca_cert": {
"order": 110,
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"label": "CA cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
},
"none": {}
}
},
"disabled": {}
},
"ssh_enabled": {
"order": 120,
"$ref": "#/properties/ssh_enabled",
"key": "ssh_enabled",
"label": "SSH tunnel",
"description": "Connect through an SSH server",
"help_text": "Connect through an SSH server to access databases in private networks",
"widget": "toggle-flip",
"default": "disabled",
"enabled": {
"ssh_host": {
"order": 130,
"$ref": "#/properties/ssh_host",
"key": "ssh_host",
"label": "SSH host",
"description": "ssh.example.com",
"widget": "text-v3",
"help_text": "SSH server hostname or IP address"
},
"ssh_port": {
"order": 140,
"$ref": "#/properties/ssh_port",
"key": "ssh_port",
"label": "SSH port",
"description": "22",
"widget": "text-v3",
"help_text": "Default SSH port is 22"
},
"ssh_username": {
"order": 150,
"$ref": "#/properties/ssh_username",
"key": "ssh_username",
"label": "SSH username",
"description": "SSH Username",
"widget": "text-v3"
},
"ssh_dst_host": {
"order": 155,
"$ref": "#/properties/ssh_dst_host",
"key": "ssh_dst_host",
"label": "SSH dst host",
"description": "localhost",
"widget": "text-v3"
},
"ssh_auth_type": {
"order": 160,
"$ref": "#/properties/ssh_auth_type",
"key": "ssh_auth_type",
"label": "Authentication type",
"widget": "dropdown-component-flip",
"default": "private_key",
"list": [
{ "value": "private_key", "name": "Private Key" },
{ "value": "password", "name": "Password" }
]
},
"private_key": {
"ssh_private_key": {
"order": 170,
"$ref": "#/properties/ssh_private_key",
"key": "ssh_private_key",
"label": "SSH private key",
"widget": "password-v3-textarea"
},
"ssh_passphrase": {
"order": 180,
"$ref": "#/properties/ssh_passphrase",
"key": "ssh_passphrase",
"label": "SSH passphrase",
"widget": "password-v3"
}
},
"password": {
"ssh_password": {
"order": 170,
"$ref": "#/properties/ssh_password",
"key": "ssh_password",
"label": "SSH password",
"widget": "password-v3"
}
}
},
"disabled": {}
}
}
}
}