Skip to content

Commit

Permalink
Renamed folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdjere committed May 24, 2024
1 parent bd434de commit 27ed76b
Show file tree
Hide file tree
Showing 31 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta
import { initPromisePool } from '../../../../../utils/promise_pool';
import { withSecuritySpan } from '../../../../../utils/with_security_span';
import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset';
import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client';
import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client';

export const createPrebuiltRules = (
rulesManagementClient: IRulesManagementClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta
import { initPromisePool } from '../../../../../utils/promise_pool';
import { withSecuritySpan } from '../../../../../utils/with_security_span';
import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset';
import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client';
import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client';

/**
* Upgrades existing prebuilt rules given a set of rules and output index.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { riskEngineDataClientMock } from '../../../entity_analytics/risk_engine/
import { riskScoreDataClientMock } from '../../../entity_analytics/risk_score/risk_score_data_client.mock';
import { assetCriticalityDataClientMock } from '../../../entity_analytics/asset_criticality/asset_criticality_data_client.mock';
import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks';
import { rulesManagementClientMock } from '../../rule_management/logic/crud/__mocks__/rules_management_client';
import { rulesManagementClientMock } from '../../rule_management/logic/rule_management/__mocks__/rules_management_client';

export const createMockClients = () => {
const core = coreMock.createRequestHandlerContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ import {
CreateRuleExceptionsRequestParams,
} from '../../../../../../common/api/detection_engine/rule_exceptions';

import { readRules } from '../../../rule_management/logic/crud/read_rules';
import { readRules } from '../../../rule_management/logic/rule_management/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../rule_management/logic/exceptions/check_for_default_rule_exception_list';
import type { RuleParams } from '../../../rule_schema';
import type { SecuritySolutionPluginRouter } from '../../../../../types';
import { buildSiemResponse } from '../../../routes/utils';
import { buildRouteValidation } from '../../../../../utils/build_validation/route_validation';
import type { IRulesManagementClient } from '../../../rule_management/logic/crud/rules_management_client';
import type { IRulesManagementClient } from '../../../rule_management/logic/rule_management/rules_management_client';

export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter) => {
router.versioned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../../common/con
import type { PromisePoolOutcome } from '../../../../../../utils/promise_pool';
import { initPromisePool } from '../../../../../../utils/promise_pool';
import type { RuleAlertType } from '../../../../rule_schema';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { findRules } from '../../../logic/search/find_rules';
import { MAX_RULES_TO_PROCESS_TOTAL } from './route';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
getBulkDisableRuleActionSchemaMock,
} from '../../../../../../../common/api/detection_engine/rule_management/mocks';
import { loggingSystemMock } from '@kbn/core/server/mocks';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';

jest.mock('../../../../../machine_learning/authz');
jest.mock('../../../logic/crud/read_rules', () => ({ readRules: jest.fn() }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '../../../../../../../common/api/detection_engine/rule_management';

import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getDuplicates } from './get_duplicates';
import { transformValidateBulkError } from '../../../utils/validate';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
createBulkErrorObject,
transformBulkError,
} from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getIdBulkError } from '../../../utils/utils';
import { transformValidateBulkError } from '../../../utils/validate';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { transformBulkError, buildSiemResponse } from '../../../../routes/utils';
import { getIdBulkError } from '../../../utils/utils';
import { transformValidateBulkError } from '../../../utils/validate';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
buildSiemResponse,
createBulkErrorObject,
} from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { transformValidate, validateResponseActionsPermissions } from '../../../utils/validate';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getIdError, transform } from '../../../utils/utils';

export const deleteRuleRoute = (router: SecuritySolutionPluginRouter) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { getIdError } from '../../../utils/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { getIdError, transform } from '../../../utils/utils';

export const readRuleRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
import { readRules } from '../../../logic/crud/read_rules';
import { readRules } from '../../../logic/rule_management/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { getIdError } from '../../../utils/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { RuleToImport } from '../../../../../../common/api/detection_engine
import type { ImportRuleResponse } from '../../../routes/utils';
import { createBulkErrorObject } from '../../../routes/utils';
import { checkRuleExceptionReferences } from './check_rule_exception_references';
import type { IRulesManagementClient } from '../crud/rules_management_client';
import type { IRulesManagementClient } from '../rule_management/rules_management_client';

export type PromiseFromStreams = RuleToImport | Error;
export interface RuleExceptionsPromiseFromStreams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
RuleObjectId,
RuleResponse,
} from '../../../../../../../common/api/detection_engine/model/rule_schema';
import { readRules } from '../../../../rule_management/logic/crud/read_rules';
import { readRules } from '../../../../rule_management/logic/rule_management/read_rules';
import { transform } from '../../../../rule_management/utils/utils';

// TODO: https://github.com/elastic/kibana/issues/125642 Move to rule_management into a RuleManagementClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type { EndpointAppContextService } from './endpoint/endpoint_app_context_
import { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client';
import { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client';
import { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality';
import { createRulesManagementClient } from './lib/detection_engine/rule_management/logic/crud/rules_management_client';
import { createRulesManagementClient } from './lib/detection_engine/rule_management/logic/rule_management/rules_management_client';

export interface IRequestContextFactory {
create(
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type { EndpointInternalFleetServicesInterface } from './endpoint/services
import type { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client';
import type { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client';
import type { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality';
import type { IRulesManagementClient } from './lib/detection_engine/rule_management/logic/crud/rules_management_client';
import type { IRulesManagementClient } from './lib/detection_engine/rule_management/logic/rule_management/rules_management_client';
export { AppClient };

export interface SecuritySolutionApiRequestHandlerContext {
Expand Down

0 comments on commit 27ed76b

Please sign in to comment.