[8.12] cherrypick ssl mongo (#172851) (#172863)

# Backport

This will backport the following commits from `main` to `8.12`:
- [cherrypick ssl mongo
(#172851)](https://github.com/elastic/kibana/pull/172851)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sean
Story","email":"sean.j.story@gmail.com"},"sourceCommit":{"committedDate":"2023-12-07T18:00:00Z","message":"cherrypick
ssl mongo (#172851)\n\n## Summary\r\n\r\nRetrying
https://github.com/elastic/kibana/pull/172658 since something\r\nin the
automation isn't working\r\n\r\n\r\n\r\n\r\n### For maintainers\r\n\r\n-
[ ] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
parthpuri-elastic
<parthpuri.goswami@elastic.co>","sha":"4ea262db53179df023e2a8e21dde698b0b7ee866","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.12.0","v8.13.0"],"number":172851,"url":"https://github.com/elastic/kibana/pull/172851","mergeCommit":{"message":"cherrypick
ssl mongo (#172851)\n\n## Summary\r\n\r\nRetrying
https://github.com/elastic/kibana/pull/172658 since something\r\nin the
automation isn't working\r\n\r\n\r\n\r\n\r\n### For maintainers\r\n\r\n-
[ ] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
parthpuri-elastic
<parthpuri.goswami@elastic.co>","sha":"4ea262db53179df023e2a8e21dde698b0b7ee866"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172851","number":172851,"mergeCommit":{"message":"cherrypick
ssl mongo (#172851)\n\n## Summary\r\n\r\nRetrying
https://github.com/elastic/kibana/pull/172658 since something\r\nin the
automation isn't working\r\n\r\n\r\n\r\n\r\n### For maintainers\r\n\r\n-
[ ] This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
parthpuri-elastic
<parthpuri.goswami@elastic.co>","sha":"4ea262db53179df023e2a8e21dde698b0b7ee866"}}]}]
BACKPORT-->

Co-authored-by: Sean Story <sean.j.story@gmail.com>
This commit is contained in:
Kibana Machine 2023-12-07 14:16:29 -05:00 committed by GitHub
parent e0ca329483
commit e5bcd5f9a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1378,6 +1378,84 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: false,
},
ssl_enabled: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.sslEnabledLabel',
{
defaultMessage: 'SSL/TLS Connection',
}
),
options: [],
order: 7,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.sslEnabledTooltip',
{
defaultMessage:
'This option establishes a secure connection to the MongoDB server using SSL/TLS encryption. Ensure that your MongoDB deployment supports SSL/TLS connections. Enable if MongoDB cluster uses DNS SRV records.',
}
),
type: FieldType.BOOLEAN,
ui_restrictions: [],
validations: [],
value: false,
},
ssl_ca: {
default_value: '',
depends_on: [{ field: 'ssl_enabled', value: true }],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.sslCaLabel',
{
defaultMessage: 'Certificate Authority (.pem)',
}
),
options: [],
order: 8,
required: false,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.sslCaTooltip',
{
defaultMessage:
'Specifies the root certificate from the Certificate Authority. The value of the certificate is used to validate the certificate presented by the MongoDB instance.',
}
),
type: FieldType.STRING,
ui_restrictions: [],
validations: [],
value: '',
},
tls_insecure: {
default_value: false,
depends_on: [{ field: 'ssl_enabled', value: true }],
display: DisplayType.TOGGLE,
label: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.tlsInsecureLabel',
{
defaultMessage: 'Skip certificate verification',
}
),
options: [],
order: 9,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.mongodb.configuration.tlsInsecureTooltip',
{
defaultMessage:
"This option skips certificate validation for TLS/SSL connections to your MongoDB server. We strongly recommend setting this option to 'disable'.",
}
),
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.FILTERING_ADVANCED_CONFIG]: true,