[Enterprise Search]Add Document Level Security feature flag (#158538)

## Summary

Adds a featureFlag from config to enable/disable Document Level Security
elements.

Flag is `hasDLSEnabled`, and available through Kea, Kibana Logic.

### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
This commit is contained in:
Efe Gürkan YALAMAN 2023-05-26 16:03:23 +02:00 committed by GitHub
parent 97e122f16d
commit f84e2d6545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 0 deletions

View file

@ -34,6 +34,7 @@ export const DEFAULT_INITIAL_APP_DATA = {
features: {
hasConnectors: true,
hasDefaultIngestPipeline: true,
hasDocumentLevelSecurityEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
},

View file

@ -172,6 +172,7 @@ export enum INGESTION_METHOD_IDS {
export const DEFAULT_PRODUCT_FEATURES: ProductFeatures = {
hasConnectors: true,
hasDefaultIngestPipeline: true,
hasDocumentLevelSecurityEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
};

View file

@ -39,6 +39,7 @@ export interface ProductAccess {
export interface ProductFeatures {
hasConnectors: boolean;
hasDefaultIngestPipeline: boolean;
hasDocumentLevelSecurityEnabled: boolean;
hasNativeConnectors: boolean;
hasWebCrawler: boolean;
}

View file

@ -22,6 +22,7 @@ export const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
hasConnectors: schema.boolean({ defaultValue: true }),
hasDefaultIngestPipeline: schema.boolean({ defaultValue: true }),
hasDocumentLevelSecurityEnabled: schema.boolean({ defaultValue: true }),
hasNativeConnectors: schema.boolean({ defaultValue: true }),
hasWebCrawler: schema.boolean({ defaultValue: true }),
host: schema.maybe(schema.string()),

View file

@ -53,6 +53,7 @@ export const callEnterpriseSearchConfigAPI = async ({
features: {
hasConnectors: config.hasConnectors,
hasDefaultIngestPipeline: config.hasDefaultIngestPipeline,
hasDocumentLevelSecurityEnabled: config.hasDocumentLevelSecurityEnabled,
hasNativeConnectors: config.hasNativeConnectors,
hasWebCrawler: config.hasWebCrawler,
},
@ -106,6 +107,7 @@ export const callEnterpriseSearchConfigAPI = async ({
features: {
hasConnectors: config.hasConnectors,
hasDefaultIngestPipeline: config.hasDefaultIngestPipeline,
hasDocumentLevelSecurityEnabled: config.hasDocumentLevelSecurityEnabled,
hasNativeConnectors: config.hasNativeConnectors,
hasWebCrawler: config.hasWebCrawler,
},