Skip to content

Commit

Permalink
[8.11] [Enterprise Search][Connectors] Add missing RCFs for Google Dr…
Browse files Browse the repository at this point in the history
…ive (#168832) (#168930)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[Enterprise Search][Connectors] Add missing RCFs for Google Drive
(#168832)](#168832)

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

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

<!--BACKPORT [{"author":{"name":"Jedr
Blaszyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-16T09:08:29Z","message":"[Enterprise
Search][Connectors] Add missing RCFs for Google Drive
(#168832)","sha":"de13e236d6df289ac8a6a912f6b9c5aeb8289ef6","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.11.0","v8.12.0"],"number":168832,"url":"https://github.com/elastic/kibana/pull/168832","mergeCommit":{"message":"[Enterprise
Search][Connectors] Add missing RCFs for Google Drive
(#168832)","sha":"de13e236d6df289ac8a6a912f6b9c5aeb8289ef6"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168832","number":168832,"mergeCommit":{"message":"[Enterprise
Search][Connectors] Add missing RCFs for Google Drive
(#168832)","sha":"de13e236d6df289ac8a6a912f6b9c5aeb8289ef6"}}]}]
BACKPORT-->

Co-authored-by: Jedr Blaszyk <[email protected]>
  • Loading branch information
kibanamachine and jedrazb authored Oct 16, 2023
1 parent 822d79e commit 49249e3
Showing 1 changed file with 106 additions and 4 deletions.
110 changes: 106 additions & 4 deletions packages/kbn-search-connectors/types/native_connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,13 +776,111 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: '',
},
use_domain_wide_delegation_for_sync: {
default_value: null,
depends_on: [],
display: DisplayType.TOGGLE,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.useDomainWideDelegation.label',
{
defaultMessage: 'Use domain-wide delegation for data sync',
}
),
options: [],
order: 2,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.useDomainWideDelegation.tooltip',
{
defaultMessage:
'Enable domain-wide delegation to automatically sync content from all shared and personal drives in the Google workspace. This eliminates the need to manually share Google Drive data with your service account, though it may increase sync time. If disabled, only items and folders manually shared with the service account will be synced. Please refer to the connector documentation to ensure domain-wide delegation is correctly configured and has the appropriate scopes.',
}
),
type: FieldType.BOOLEAN,
ui_restrictions: [],
validations: [],
value: false,
},
google_workspace_admin_email_for_data_sync: {
default_value: null,
depends_on: [
{
field: 'use_domain_wide_delegation_for_sync',
value: true,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmailDataSync.label',
{
defaultMessage: 'Google Workspace admin email',
}
),
options: [],
order: 3,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmailDataSync.tooltip',
{
defaultMessage:
'Provide the admin email to be used with domain-wide delegation for data sync. This email enables the connector to utilize the Admin Directory API for listing organization users. Please refer to the connector documentation to ensure domain-wide delegation is correctly configured and has the appropriate scopes.',
}
),
type: FieldType.STRING,
ui_restrictions: [],
validations: [
{
type: 'regex',
constraint: '^\\S+@\\S+\\.\\S+$',
},
],
value: '',
},
google_workspace_email_for_shared_drives_sync: {
default_value: null,
depends_on: [
{
field: 'use_domain_wide_delegation_for_sync',
value: true,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceEmailSharedDrivesSync.label',
{
defaultMessage: 'Google Workspace email for syncing shared drives',
}
),
options: [],
order: 4,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceEmailSharedDrivesSync.tooltip',
{
defaultMessage:
'Provide the Google Workspace user email for discovery and syncing of shared drives. Only the shared drives this user has access to will be synced.',
}
),
type: FieldType.STRING,
ui_restrictions: [],
validations: [
{
type: 'regex',
constraint: '^\\S+@\\S+\\.\\S+$',
},
],
value: '',
},
use_document_level_security: {
default_value: null,
depends_on: [],
display: DisplayType.TOGGLE,
label: ENABLE_DOCUMENT_LEVEL_SECURITY_LABEL,
options: [],
order: 2,
order: 5,
required: true,
sensitive: false,
tooltip: ENABLE_DOCUMENT_LEVEL_SECURITY_TOOLTIP,
Expand All @@ -798,14 +896,18 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
field: 'use_document_level_security',
value: true,
},
{
field: 'use_domain_wide_delegation_for_sync',
value: false,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmail.label',
{ defaultMessage: 'Google Workspace admin email' }
),
options: [],
order: 3,
order: 6,
required: true,
sensitive: false,
tooltip: i18n.translate(
Expand Down Expand Up @@ -833,7 +935,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
defaultMessage: 'Maximum concurrent HTTP requests',
}),
options: [],
order: 4,
order: 7,
required: false,
sensitive: false,
tooltip: i18n.translate('searchConnectors.nativeConnectors.gdrive.maxHTTPRequest.tooltip', {
Expand All @@ -856,7 +958,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 5,
order: 8,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
Expand Down

0 comments on commit 49249e3

Please sign in to comment.