Skip to content

Commit

Permalink
[8.x] Add new native fields for SPO connector - certificate authentic…
Browse files Browse the repository at this point in the history
…ate (#205337) (#206271)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Add new native fields for SPO connector - certificate authenticate
(#205337)](#205337)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Artem
Shelkovnikov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-10T11:51:25Z","message":"Add
new native fields for SPO connector - certificate authenticate
(#205337)\n\n## Summary\r\n\r\nThis PR reflects the changes done
in\r\nhttps://github.com/elastic/connectors/pull/3064: update of
Sharepoint\r\nOnline native connector configurable fields.\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"f612e71452b9f38e84ebe9ee275804624dd6e43e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"number":205337,"url":"https://github.com/elastic/kibana/pull/205337","mergeCommit":{"message":"Add
new native fields for SPO connector - certificate authenticate
(#205337)\n\n## Summary\r\n\r\nThis PR reflects the changes done
in\r\nhttps://github.com/elastic/connectors/pull/3064: update of
Sharepoint\r\nOnline native connector configurable fields.\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"f612e71452b9f38e84ebe9ee275804624dd6e43e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205337","number":205337,"mergeCommit":{"message":"Add
new native fields for SPO connector - certificate authenticate
(#205337)\n\n## Summary\r\n\r\nThis PR reflects the changes done
in\r\nhttps://github.com/elastic/connectors/pull/3064: update of
Sharepoint\r\nOnline native connector configurable fields.\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"f612e71452b9f38e84ebe9ee275804624dd6e43e"}}]}]
BACKPORT-->
  • Loading branch information
artem-shelkovnikov authored Jan 13, 2025
1 parent 75d5168 commit 3ee7fde
Showing 1 changed file with 147 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4242,6 +4242,45 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: '',
},
auth_method: {
default_value: null,
depends_on: [],
display: DROPDOWN,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.authMethodLabel',
{
defaultMessage: 'Authentication Method',
}
),
options: [
{
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.authMethod.clientSecretLabel',
{
defaultMessage: 'Client Secret',
}
),
value: 'secret',
},
{
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.authMethod.certificateLabel',
{
defaultMessage: 'Certificate',
}
),
value: 'certificate',
},
],
order: 4,
required: true,
sensitive: false,
tooltip: null,
type: STRING,
ui_restrictions: [],
validations: [],
value: 'certificate',
},
secret_value: {
default_value: null,
depends_on: [],
Expand All @@ -4253,7 +4292,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 4,
order: 5,
required: true,
sensitive: true,
tooltip: '',
Expand All @@ -4262,6 +4301,56 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: '',
},
certificate: {
default_value: null,
depends_on: [
{
field: 'auth_method',
value: 'certificate',
},
],
display: TEXTAREA,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.certificateLabel',
{
defaultMessage: 'Content of certificate file',
}
),
options: [],
order: 6,
required: true,
sensitive: true,
tooltip: null,
type: STRING,
ui_restrictions: [],
validations: [],
value: '',
},
private_key: {
default_value: null,
depends_on: [
{
field: 'auth_method',
value: 'certificate',
},
],
display: TEXTAREA,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.privateKeyLabel',
{
defaultMessage: 'Content of private key file',
}
),
options: [],
order: 7,
required: true,
sensitive: true,
tooltip: null,
type: STRING,
ui_restrictions: [],
validations: [],
value: '',
},
site_collections: {
default_value: null,
depends_on: [],
Expand All @@ -4273,7 +4362,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 5,
order: 8,
required: true,
sensitive: false,
tooltip: translate(
Expand All @@ -4289,13 +4378,63 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: '*',
},
enumerate_all_sites: {
default_value: true,
depends_on: [],
display: TOGGLE,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.enumerateAllSitesLabel',
{ defaultMessage: 'Enumerate all sites?' }
),
options: [],
order: 9,
required: false,
sensitive: false,
tooltip: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.enumerateAllSitesTooltip',
{
defaultMessage:
'If enabled, sites will be fetched in bulk, then filtered down to the configured list of sites. This is efficient when syncing many sites. If disabled, each configured site will be fetched with an individual request. This is efficient when syncing fewer sites.',
}
),
type: BOOLEAN,
ui_restrictions: [],
validations: [],
value: true,
},
fetch_subsites: {
default_value: false,
depends_on: [{ field: 'enumerate_all_sites', value: false }],
display: TOGGLE,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.fetchSubsitesLabel',
{
defaultMessage: 'Fetch sub-sites of configured sites?',
}
),
options: [],
order: 10,
required: false,
sensitive: false,
tooltip: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.fetchSubsitesTooltip',
{
defaultMessage:
'Whether subsites of the configured site(s) should be automatically fetched.',
}
),
type: BOOLEAN,
ui_restrictions: [],
validations: [],
value: true,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 6,
order: 11,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
Expand All @@ -4315,7 +4454,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 7,
order: 12,
required: true,
sensitive: false,
tooltip: translate(
Expand Down Expand Up @@ -4346,7 +4485,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 8,
order: 13,
required: true,
sensitive: false,
tooltip: translate(
Expand Down Expand Up @@ -4377,7 +4516,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 9,
order: 14,
required: true,
sensitive: false,
tooltip: translate(
Expand Down Expand Up @@ -4408,7 +4547,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 10,
order: 15,
required: true,
sensitive: false,
tooltip: translate(
Expand Down Expand Up @@ -4439,7 +4578,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
}
),
options: [],
order: 11,
order: 16,
required: true,
sensitive: false,
tooltip: translate(
Expand All @@ -4454,56 +4593,6 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: true,
},
enumerate_all_sites: {
default_value: true,
depends_on: [],
display: TOGGLE,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.enumerateAllSitesLabel',
{ defaultMessage: 'Enumerate all sites?' }
),
options: [],
order: 6,
required: false,
sensitive: false,
tooltip: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.enumerateAllSitesTooltip',
{
defaultMessage:
'If enabled, sites will be fetched in bulk, then filtered down to the configured list of sites. This is efficient when syncing many sites. If disabled, each configured site will be fetched with an individual request. This is efficient when syncing fewer sites.',
}
),
type: BOOLEAN,
ui_restrictions: [],
validations: [],
value: true,
},
fetch_subsites: {
default_value: false,
depends_on: [{ field: 'enumerate_all_sites', value: false }],
display: TOGGLE,
label: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.fetchSubsitesLabel',
{
defaultMessage: 'Fetch sub-sites of configured sites?',
}
),
options: [],
order: 7,
required: false,
sensitive: false,
tooltip: translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.fetchSubsitesTooltip',
{
defaultMessage:
'Whether subsites of the configured site(s) should be automatically fetched.',
}
),
type: BOOLEAN,
ui_restrictions: [],
validations: [],
value: true,
},
},
features: {
[SYNC_RULES]: {
Expand Down

0 comments on commit 3ee7fde

Please sign in to comment.