diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index f245214cfa37..ad6a6bbcbcc2 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -52,9 +52,8 @@ export class KibanaFramework { config: InfraRouteConfig, handler: RequestHandler ) { - const defaultOptions = { - tags: ['access:infra'], - }; + const defaultSecurity = { authz: { requiredPrivileges: ['infra'] } }; + const routeConfig = { path: config.path, validate: config.validate, @@ -65,7 +64,8 @@ export class KibanaFramework { * using `as ...` below to ensure the route config has * the correct options type. */ - options: { ...config.options, ...defaultOptions }, + options: { ...config.options }, + security: defaultSecurity, }; switch (config.method) { case 'get': @@ -89,15 +89,12 @@ export class KibanaFramework { public registerVersionedRoute( config: InfraVersionedRouteConfig ) { - const defaultOptions = { - tags: ['access:infra'], - }; + const defaultSecurity = { authz: { requiredPrivileges: ['infra'] } }; + const routeConfig = { access: config.access, path: config.path, - // Currently we have no use of custom options beyond tags, this can be extended - // beyond defaultOptions if it's needed. - options: defaultOptions, + security: defaultSecurity, }; switch (config.method) { case 'get': diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_overview_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_overview_tab.tsx index 7fd3cc270286..6ad182d72251 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_overview_tab.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_overview_tab.tsx @@ -88,7 +88,7 @@ const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectio }; interface RuleOverviewTabProps { - rule: RuleResponse; + rule: Partial; columnWidths?: EuiDescriptionListProps['columnWidths']; expandedOverviewSections: Record; toggleOverviewSection: Record void>; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx index 60a44c251e92..584a5fb9320f 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx @@ -126,7 +126,7 @@ export const MigrationRuleDetailsFlyout: React.FC { const elasticRule = ruleMigration?.elastic_rule; if (isMigrationCustomRule(elasticRule)) { - return convertMigrationCustomRuleToSecurityRulePayload(elasticRule, false) as RuleResponse; // TODO: we need to adjust RuleOverviewTab to allow partial RuleResponse as a parameter; + return convertMigrationCustomRuleToSecurityRulePayload(elasticRule, false); } return matchedPrebuiltRule; }, [ruleMigration, matchedPrebuiltRule]);