Skip to content

Commit

Permalink
Merge branch 'main' into task/olm-8131-fix-authz-on-file-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares authored Jul 30, 2024
2 parents c35cb86 + 3a19c35 commit 9c744a5
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 59 deletions.
118 changes: 97 additions & 21 deletions docs/osquery/exported-fields-reference.asciidoc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
{
"type": "plugin",
"id": "@kbn/observability-onboarding-plugin",
"owner": [
"@elastic/obs-ux-logs-team",
"@elastic/obs-ux-onboarding-team"
],
"owner": ["@elastic/obs-ux-logs-team", "@elastic/obs-ux-onboarding-team"],
"plugin": {
"id": "observabilityOnboarding",
"server": true,
"browser": true,
"configPath": [
"xpack",
"observability_onboarding"
],
"configPath": ["xpack", "observability_onboarding"],
"requiredPlugins": [
"data",
"observability",
"observabilityShared",
"discover",
"share",
"fleet",
"security",
"customIntegrations",
],
"optionalPlugins": [
"cloud",
"cloudExperiments",
"usageCollection"
],
"requiredBundles": [
"kibanaReact"
"customIntegrations"
],
"extraPublicDirs": [
"common"
]
"optionalPlugins": ["cloud", "cloudExperiments", "usageCollection"],
"requiredBundles": ["kibanaReact"],
"extraPublicDirs": ["common"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
} from '@kbn/core/public';
import type { CloudExperimentsPluginStart } from '@kbn/cloud-experiments-plugin/common';
import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public';
import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public';
import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public';
import { DiscoverSetup, DiscoverStart } from '@kbn/discover-plugin/public';
import { FleetSetup, FleetStart } from '@kbn/fleet-plugin/public';
Expand All @@ -46,7 +45,6 @@ export interface ObservabilityOnboardingPluginSetupDeps {
discover: DiscoverSetup;
share: SharePluginSetup;
fleet: FleetSetup;
security: SecurityPluginSetup;
cloud?: CloudSetup;
usageCollection?: UsageCollectionSetup;
}
Expand All @@ -58,7 +56,6 @@ export interface ObservabilityOnboardingPluginStartDeps {
discover: DiscoverStart;
share: SharePluginStart;
fleet: FleetStart;
security: SecurityPluginStart;
cloud?: CloudStart;
usageCollection?: UsageCollectionStart;
cloudExperiments?: CloudExperimentsPluginStart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({
}

const fleetPluginStart = await plugins.fleet.start();
const securityPluginStart = await plugins.security.start();

const [onboardingFlow, ingestApiKey, installApiKey, elasticAgentVersion] = await Promise.all([
saveObservabilityOnboardingFlow({
Expand All @@ -230,10 +229,9 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({
},
}),
createShipperApiKey(client.asCurrentUser, `onboarding_ingest_${name}`),
securityPluginStart.authc.apiKeys.create(
request,
createInstallApiKey(`onboarding_install_${name}`)
),
(
await context.resolve(['core'])
).core.security.authc.apiKeys.create(createInstallApiKey(`onboarding_install_${name}`)),
getAgentVersion(fleetPluginStart, kibanaVersion),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
PluginStart as DataPluginStart,
} from '@kbn/data-plugin/server';
import { FleetSetupContract, FleetStartContract } from '@kbn/fleet-plugin/server';
import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server';
import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server';
import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
import {
Expand All @@ -26,7 +25,6 @@ export interface ObservabilityOnboardingPluginSetupDependencies {
cloud: CloudSetup;
usageCollection: UsageCollectionSetup;
fleet: FleetSetupContract;
security: SecurityPluginSetup;
customIntegrations: CustomIntegrationsPluginSetup;
}

Expand All @@ -36,7 +34,6 @@ export interface ObservabilityOnboardingPluginStartDependencies {
cloud: CloudStart;
usageCollection: undefined;
fleet: FleetStartContract;
security: SecurityPluginStart;
customIntegrations: CustomIntegrationsPluginStart;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const TheHiveParamsAlertFields: React.FC<ActionParamsProps<ExecutorParams
helpText: '',
isInvalid:
errors['createAlertParam.title'] !== undefined &&
errors['createAlertParam.title'].length > 0 &&
Number(errors['createAlertParam.title'].length) > 0 &&
alert.title !== undefined,
error: errors['createAlertParam.title'] as string,
}}
Expand Down Expand Up @@ -102,7 +102,7 @@ export const TheHiveParamsAlertFields: React.FC<ActionParamsProps<ExecutorParams
helpText: '',
isInvalid:
errors['createAlertParam.type'] !== undefined &&
errors['createAlertParam.type'].length > 0 &&
Number(errors['createAlertParam.type'].length) > 0 &&
alert.type !== undefined,
error: errors['createAlertParam.type'] as string,
}}
Expand All @@ -122,7 +122,7 @@ export const TheHiveParamsAlertFields: React.FC<ActionParamsProps<ExecutorParams
helpText: '',
isInvalid:
errors['createAlertParam.source'] !== undefined &&
errors['createAlertParam.source'].length > 0 &&
Number(errors['createAlertParam.source'].length) > 0 &&
alert.source !== undefined,
error: errors['createAlertParam.source'] as string,
}}
Expand All @@ -143,7 +143,7 @@ export const TheHiveParamsAlertFields: React.FC<ActionParamsProps<ExecutorParams
helpText: '',
isInvalid:
errors['createAlertParam.sourceRef'] !== undefined &&
errors['createAlertParam.sourceRef'].length > 0 &&
Number(errors['createAlertParam.sourceRef'].length) > 0 &&
alert.sourceRef !== undefined,
error: errors['createAlertParam.sourceRef'] as string,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const TheHiveParamsCaseFields: React.FC<ActionParamsProps<ExecutorParams>
helpText: '',
isInvalid:
errors['pushToServiceParam.incident.title'] !== undefined &&
errors['pushToServiceParam.incident.title'].length > 0 &&
Number(errors['pushToServiceParam.incident.title'].length) > 0 &&
incident.title !== undefined,
error: errors['pushToServiceParam.incident.title'] as string,
}}
Expand Down

0 comments on commit 9c744a5

Please sign in to comment.