Skip to content

Commit

Permalink
Merge branch 'main' into split-types-from-code-on-kbn-dev-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Dec 7, 2021
2 parents 8d89d98 + 062be17 commit dde8c39
Show file tree
Hide file tree
Showing 155 changed files with 3,612 additions and 887 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ readonly links: {
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly apiKeys: string;
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
Expand Down

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions docs/osquery/osquery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,21 @@ This is useful for teams who need in-depth and detailed control.

[float]
=== Customize Osquery configuration
By default, all Osquery Manager integrations share the same osquery configuration. However, you can customize how Osquery is configured by editing the Osquery Manager integration for each agent policy
experimental[] By default, all Osquery Manager integrations share the same osquery configuration. However, you can customize how Osquery is configured by editing the Osquery Manager integration for each agent policy
you want to adjust. The custom configuration is then applied to all agents in the policy.
This powerful feature allows you to configure
https://osquery.readthedocs.io/en/stable/deployment/file-integrity-monitoring[File Integrity Monitoring], https://osquery.readthedocs.io/en/stable/deployment/process-auditing[Process auditing],
and https://osquery.readthedocs.io/en/stable/deployment/configuration/#configuration-specification[others].

IMPORTANT: Take caution when editing this configuration. The changes you make are distributed to all agents in the policy.
[IMPORTANT]
=========================
* Take caution when editing this configuration. The changes you make are distributed to all agents in the policy.
* Take caution when editing `packs` using the Advanced *Osquery config* field.
Any changes you make to `packs` from this field are not reflected in the UI on the Osquery *Packs* page in {kib}, however, these changes are deployed to agents in the policy.
While this allows you to use advanced Osquery functionality like pack discovery queries, you do lose the ability to manage packs defined this way from the Osquery *Packs* page.
=========================

. From the {kib} main menu, click *Fleet*, then the *Agent policies* tab.

Expand All @@ -315,6 +323,16 @@ IMPORTANT: Take caution when editing this configuration. The changes you make ar
* (Optional) To load a full configuration file, drag and drop an Osquery `.conf` file into the area at the bottom of the page.

. Click *Save integration* to apply the custom configuration to all agents in the policy.
+
As an example, the following configuration disables two tables.
+
```ts
{
"options":{
"disable_tables":"curl,process_envs"
}
}
```

[float]
=== Upgrade Osquery versions
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ services:

==== Persist the {kib} keystore

By default, {kib] auto-generates a keystore file for secure settings at startup. To persist your {kibana-ref}/secure-settings.html[secure settings], use the `kibana-keystore` utility to bind-mount the parent directory of the keystore to the container. For example:
By default, {kib} auto-generates a keystore file for secure settings at startup. To persist your {kibana-ref}/secure-settings.html[secure settings], use the `kibana-keystore` utility to bind-mount the parent directory of the keystore to the container. For example:

["source","sh",subs="attributes"]
----
Expand Down
6 changes: 3 additions & 3 deletions docs/setup/install/deb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ locations for a Debian-based system:
| path.data

| logs
| Logs files location
| /var/log/kibana
| path.logs
| Logs files location
| /var/log/kibana
| path.logs

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
Expand Down
7 changes: 3 additions & 4 deletions docs/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,16 @@ locations for an RPM-based system:
| Configuration files including `kibana.yml`
| /etc/kibana
| <<settings,KBN_PATH_CONF>>
d|

| data
| The location of the data files written to disk by Kibana and its plugins
| /var/lib/kibana
| path.data

| logs
| Logs files location
| /var/log/kibana
| path.logs
| Logs files location
| /var/log/kibana
| path.logs

| plugins
| Plugin files location. Each plugin will be contained in a subdirectory.
Expand Down
3 changes: 1 addition & 2 deletions docs/setup/install/targz.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ important data later on.
| home
| Kibana home directory or `$KIBANA_HOME`
d| Directory created by unpacking the archive
d|
|

| bin
| Binary scripts including `kibana` to start the Kibana server
Expand All @@ -137,7 +137,6 @@ important data later on.
| Configuration files including `kibana.yml`
| $KIBANA_HOME\config
| <<settings,KBN_PATH_CONF>>
d|

| data
| The location of the data files written to disk by Kibana and its plugins
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class DocLinksService {
usersAccess: `${ENTERPRISE_SEARCH_DOCS}users-access.html`,
},
workplaceSearch: {
apiKeys: `${WORKPLACE_SEARCH_DOCS}workplace-search-api-authentication.html`,
box: `${WORKPLACE_SEARCH_DOCS}workplace-search-box-connector.html`,
confluenceCloud: `${WORKPLACE_SEARCH_DOCS}workplace-search-confluence-cloud-connector.html`,
confluenceServer: `${WORKPLACE_SEARCH_DOCS}workplace-search-confluence-server-connector.html`,
Expand Down Expand Up @@ -671,6 +672,7 @@ export interface DocLinksStart {
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly apiKeys: string;
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ export interface DocLinksStart {
readonly usersAccess: string;
};
readonly workplaceSearch: {
readonly apiKeys: string;
readonly box: string;
readonly confluenceCloud: string;
readonly confluenceServer: string;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/authorization/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { PluginStartContract as FeaturesPluginStart } from '../../../features/se
import { AuthFilterHelpers, GetSpaceFn, OwnerEntity } from './types';
import { getOwnersFilter } from './utils';
import { AuthorizationAuditLogger, OperationDetails } from '.';
import { createCaseError } from '../common';
import { createCaseError } from '../common/error';

/**
* This class handles ensuring that the user making a request has the correct permissions
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/alerts/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { CasesClientGetAlertsResponse } from './types';
import { CasesClientArgs } from '..';
import { AlertInfo } from '../../common';
import { AlertInfo } from '../../common/types';

export const getAlerts = async (
alertsInfo: AlertInfo[],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/alerts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { CaseStatuses } from '../../../common/api';
import { AlertInfo } from '../../common';
import { AlertInfo } from '../../common/types';

interface Alert {
id: string;
Expand Down
9 changes: 3 additions & 6 deletions x-pack/plugins/cases/server/client/attachments/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ import {
} from '../../services/user_actions/helpers';

import { AttachmentService, CasesService, CaseUserActionService } from '../../services';
import {
createCaseError,
CommentableCase,
createAlertUpdateRequest,
isCommentRequestTypeGenAlert,
} from '../../common';
import { CommentableCase } from '../../common/models';
import { createCaseError } from '../../common/error';
import { createAlertUpdateRequest, isCommentRequestTypeGenAlert } from '../../common/utils';
import { CasesClientArgs, CasesClientInternal } from '..';

import { decodeCommentRequest } from '../utils';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/server/client/attachments/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import {
} from '../../../common/constants';
import { CasesClientArgs } from '../types';
import { buildCommentUserActionItem } from '../../services/user_actions/helpers';
import { createCaseError, checkEnabledCaseConnectorOrThrow } from '../../common';
import { createCaseError } from '../../common/error';
import { checkEnabledCaseConnectorOrThrow } from '../../common/utils';
import { Operations } from '../../authorization';

/**
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/cases/server/client/attachments/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import {
} from '../../../common/api';
import { ENABLE_CASE_CONNECTOR } from '../../../common/constants';
import {
createCaseError,
checkEnabledCaseConnectorOrThrow,
defaultSortField,
transformComments,
flattenCommentSavedObject,
flattenCommentSavedObjects,
getIDsAndIndicesAsArrays,
} from '../../common';
} from '../../common/utils';
import { createCaseError } from '../../common/error';
import { defaultPage, defaultPerPage } from '../../routes/api';
import { CasesClientArgs } from '../types';
import { combineFilters, stringToKueryNode } from '../utils';
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/cases/server/client/attachments/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import Boom from '@hapi/boom';

import { SavedObjectsClientContract, Logger } from 'kibana/server';
import { LensServerPluginSetup } from '../../../../lens/server';
import { checkEnabledCaseConnectorOrThrow, CommentableCase, createCaseError } from '../../common';
import { CommentableCase } from '../../common/models';
import { createCaseError } from '../../common/error';
import { checkEnabledCaseConnectorOrThrow } from '../../common/utils';
import { buildCommentUserActionItem } from '../../services/user_actions/helpers';
import { CaseResponse, CommentPatchRequest, CommentRequest } from '../../../common/api';
import { CASE_SAVED_OBJECT, SUB_CASE_SAVED_OBJECT } from '../../../common/constants';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/server/client/cases/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { ENABLE_CASE_CONNECTOR, MAX_TITLE_LENGTH } from '../../../common/constan
import { buildCaseUserActionItem } from '../../services/user_actions/helpers';

import { Operations } from '../../authorization';
import { createCaseError, flattenCaseSavedObject, transformNewCase } from '../../common';
import { createCaseError } from '../../common/error';
import { flattenCaseSavedObject, transformNewCase } from '../../common/utils';
import { CasesClientArgs } from '..';

/**
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/cases/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SavedObject, SavedObjectsClientContract, SavedObjectsFindResponse } fro
import { CommentAttributes, SubCaseAttributes, OWNER_FIELD } from '../../../common/api';
import { ENABLE_CASE_CONNECTOR, MAX_CONCURRENT_SEARCHES } from '../../../common/constants';
import { CasesClientArgs } from '..';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { AttachmentService, CasesService } from '../../services';
import { buildCaseUserActionItem } from '../../services/user_actions/helpers';
import { Operations, OwnerEntity } from '../../authorization';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/server/client/cases/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
excess,
} from '../../../common/api';

import { createCaseError, transformCases } from '../../common';
import { createCaseError } from '../../common/error';
import { transformCases } from '../../common/utils';
import { constructQueryOptions } from '../utils';
import { includeFieldsRequiredForAuthentication } from '../../authorization/utils';
import { Operations } from '../../authorization';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/server/client/cases/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import {
CaseAttributes,
} from '../../../common/api';
import { ENABLE_CASE_CONNECTOR } from '../../../common/constants';
import { countAlertsForID, createCaseError, flattenCaseSavedObject } from '../../common';
import { createCaseError } from '../../common/error';
import { countAlertsForID, flattenCaseSavedObject } from '../../common/utils';
import { CasesClientArgs } from '..';
import { Operations } from '../../authorization';
import { combineAuthorizedAndOwnerFilter } from '../utils';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/server/client/cases/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { ENABLE_CASE_CONNECTOR } from '../../../common/constants';
import { buildCaseUserActionItem } from '../../services/user_actions/helpers';

import { createIncident, getCommentContextFromAttributes } from './utils';
import { createCaseError, flattenCaseSavedObject, getAlertInfoFromComments } from '../../common';
import { createCaseError } from '../../common/error';
import { flattenCaseSavedObject, getAlertInfoFromComments } from '../../common/utils';
import { CasesClient, CasesClientArgs, CasesClientInternal } from '..';
import { Operations } from '../../authorization';
import { casesConnectors } from '../../connectors';
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/cases/server/client/cases/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ import { buildCaseUserActions } from '../../services/user_actions/helpers';
import { getCaseToUpdate } from '../utils';

import { AlertService, CasesService } from '../../services';
import { createCaseError } from '../../common/error';
import {
createAlertUpdateRequest,
createCaseError,
flattenCaseSavedObject,
isCommentRequestTypeAlertOrGenAlert,
} from '../../common';
} from '../../common/utils';
import { UpdateAlertRequest } from '../alerts/types';
import { CasesClientArgs } from '..';
import { Operations, OwnerEntity } from '../../authorization';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/cases/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
transformers,
transformFields,
} from './utils';
import { flattenCaseSavedObject } from '../../common';
import { flattenCaseSavedObject } from '../../common/utils';
import { SECURITY_SOLUTION_OWNER } from '../../../common/constants';
import { casesConnectors } from '../../connectors';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/configure/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
throwErrors,
} from '../../../common/api';
import { MAX_CONCURRENT_SEARCHES, SUPPORTED_CONNECTORS } from '../../../common/constants';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { CasesClientInternal } from '../client_internal';
import { CasesClientArgs } from '../types';
import { getMappings } from './get_mappings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ConnectorMappingsAttributes } from '../../../common/api';
import { ACTION_SAVED_OBJECT_TYPE } from '../../../../actions/server';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { CasesClientArgs } from '..';
import { CreateMappingsArgs } from './types';
import { casesConnectors } from '../../connectors';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { SavedObjectsFindResponse } from 'kibana/server';
import { ConnectorMappings } from '../../../common/api';
import { ACTION_SAVED_OBJECT_TYPE } from '../../../../actions/server';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { CasesClientArgs } from '..';
import { MappingsArgs } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ConnectorMappingsAttributes } from '../../../common/api';
import { ACTION_SAVED_OBJECT_TYPE } from '../../../../actions/server';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { CasesClientArgs } from '..';
import { UpdateMappingsArgs } from './types';
import { casesConnectors } from '../../connectors';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { merge } from 'lodash';

import { CaseMetricsResponseRt, CaseMetricsResponse } from '../../../common/api';
import { Operations } from '../../authorization';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { CasesClient } from '../client';
import { CasesClientArgs } from '../types';
import { AlertsCount } from './alerts_count';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/stats/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
CasesStatusRequestRt,
} from '../../../common/api';
import { Operations } from '../../authorization';
import { createCaseError } from '../../common';
import { createCaseError } from '../../common/error';
import { constructQueryOptions } from '../utils';

/**
Expand Down
8 changes: 2 additions & 6 deletions x-pack/plugins/cases/server/client/sub_cases/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ import {
} from '../../../common/api';
import { CASE_SAVED_OBJECT, MAX_CONCURRENT_SEARCHES } from '../../../common/constants';
import { CasesClientArgs } from '..';
import {
countAlertsForID,
createCaseError,
flattenSubCaseSavedObject,
transformSubCases,
} from '../../common';
import { createCaseError } from '../../common/error';
import { countAlertsForID, flattenSubCaseSavedObject, transformSubCases } from '../../common/utils';
import { buildCaseUserActionItem } from '../../services/user_actions/helpers';
import { constructQueryOptions } from '../utils';
import { defaultPage, defaultPerPage } from '../../routes/api';
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/cases/server/client/sub_cases/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ import {
import { CASE_COMMENT_SAVED_OBJECT, SUB_CASE_SAVED_OBJECT } from '../../../common/constants';
import { getCaseToUpdate } from '../utils';
import { buildSubCaseUserActions } from '../../services/user_actions/helpers';
import { createCaseError } from '../../common/error';
import {
createAlertUpdateRequest,
createCaseError,
isCommentRequestTypeAlertOrGenAlert,
flattenSubCaseSavedObject,
} from '../../common';
} from '../../common/utils';
import { UpdateAlertRequest } from '../../client/alerts/types';
import { CasesClientArgs } from '../types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { CaseUserActionResponse } from '../../../common/api';
import { SUB_CASE_SAVED_OBJECT } from '../../../common/constants';
import { SUB_CASE_REF_NAME } from '../../common';
import { SUB_CASE_REF_NAME } from '../../common/constants';
import { extractAttributesWithoutSubCases } from './get';

describe('get', () => {
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/cases/server/client/user_actions/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import {
CaseUserActionResponse,
} from '../../../common/api';
import { SUB_CASE_SAVED_OBJECT } from '../../../common/constants';
import { createCaseError, checkEnabledCaseConnectorOrThrow, SUB_CASE_REF_NAME } from '../../common';
import { createCaseError } from '../../common/error';
import { checkEnabledCaseConnectorOrThrow } from '../../common/utils';
import { SUB_CASE_REF_NAME } from '../../common/constants';
import { CasesClientArgs } from '..';
import { Operations } from '../../authorization';
import { UserActionGet } from './client';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/cases/server/client/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { CaseConnector, CaseType, ConnectorTypes } from '../../common/api';
import { newCase } from '../routes/api/__mocks__/request_responses';
import { transformNewCase } from '../common';
import { transformNewCase } from '../common/utils';
import { sortToSnake } from './utils';

describe('utils', () => {
Expand Down
Loading

0 comments on commit dde8c39

Please sign in to comment.