Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.17] Add new native fields for SPO connector - certificate authenticate (#205337) #206272

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 147 additions & 58 deletions packages/kbn-search-connectors/types/native_connectors.ts
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
Loading