Closed banderror closed 1 year ago
Pinging @elastic/security-detections-response (Team:Detections and Resp)
Pinging @elastic/security-solution (Team: SecuritySolution)
@banderror - TRaDE may be able to help with this based on some changes we did for this release regarding the following PR below:
In short, we are only suggesting the least "major" compatible now instead of least compatible in general based on Kibana version. When we build the related_integrations
field, it references the queries in the rule for event.dataset
and parses this to determine package and integration, for example, event.dataset: gcp.audit
-> package:gcp, integration:audit
. If audit
is parsed we check against the compatible version package's manifest and it's policy templates to determine if this is an actual integration that exists. If not, package:gcp, version:x.x.x
is only given.
Before with these, it could have been a case where we did the least compatible, instead of least major compatible and that manifest reference did not have activitylogs
in the policy templates and thus we only set package:azure, version:x.x.x
.
I need to spend some more time looking at this on our side to determine if there is a way to be more accurate with this.
@terrancedejesus Thank you, it would be great if we could specify a package
+ integration
instead of only a package
in prebuilt rules. But if it's not possible or very hard to do in all cases, we could support this edge case in the app.
I'm still wondering, is there a legitimate situation when a concrete integration
doesn't make sense or couldn't be picked due to any non-technical / product-related reasons? cc @jethr0null
@terrancedejesus So we ended up adding support for parent packages (like aws
, azure
, gcp
) specified as related integrations in prebuilt rules, to the app. 🙂
Now the logic is as follows. If a given top-level package is specified as a related integration, for example:
// instead of this:
related_integrations: [{
package: 'azure',
version: '^1.1.0',
integration: 'activitylogs'
}]
// we have this in a rule:
related_integrations: [{
package: 'azure',
version: '^1.1.0'
}]
Then we should be able to correctly identify the status of this related integration:
Not installed
if the whole package is not installed at the moment (neither any of its integration policies exist, nor any assets are installed).Installed
if the package itself is installed, but no integration policies exist for this package. This happens when you click "Install package assets" in Fleet, or when you install a package by creating policies, but later delete all of them.Installed: enabled
if the package is installed + any of its child integrations have an existing policy.That said, I'm not sure if from the UX perspective, it makes any sense to specify top-level packages (like Azure) instead of their concrete integrations because I guess it's the concrete integrations that determine what source events will be indexed into ES.
cc @approksiu
@MadameSheema Could you please make sure this bug + https://github.com/elastic/kibana/issues/150968 + https://github.com/elastic/kibana/issues/149970 are verified against the next BC? These three should be fixed by https://github.com/elastic/kibana/pull/152055.
@karanbirsingh-qasource @sukhwindersingh-qasource can you please help to validate this ticket on the current BC? Thanks!
Hi @MadameSheema
We have validated this issue on 8.7.0 BC4 build and observed that issue is not occurring, It is Fixed. :heavy_check_mark:
Please find the below Testing Details:
Build info
VERSION: 8.7.0
BUILD: 60949
COMMIT: de22cd9361a0dbf429f9648d3c7b7c45aa862e90
Screen-Shot
Hence, We are marking it as QA Validated!!
Thanks!!
Epic: https://github.com/elastic/security-team/issues/2108 (internal)
Summary
If a prebuilt rule in one of its related integrations references the whole composite package (e.g.
azure
) without specifying a concrete integration (e.g.activitylogs
)and this integration (
activitylogs
) is installed in Fleet, on the Rules page this related integration will be shown as not installed:We need to determine the path forward: either support it in Kibana or fix the prebuilt rules.
Details
Background
Fleet integrations like AWS and Azure are known to be distributed via composite packages that contain multiple integrations inside. For example:
azure
package containsactivitylogs
,platformlogs
,adlogs
and other integrationsaws
package contains integrations likecloudfront
,cloudtrail
,cloudwatch
,dynamodb
, etcgcp
containscompute
,gke
, etcNOTE: Some of the cloud integrations are shipped via their own packages, for example
Custom Google Pub/Sub Logs
integration is shipped via a separategcp_pubsub
package, not thegcp
one.When the user installs integrations like
Azure activity logs
through the UI, Fleet actually installs its parent package (azure
) with all the integrations that it contains:activitylogs
,platformlogs
,adlogs
, etc. But we're able to distinguish enabled integrations from the disabled ones:This doesn't work
What doesn't work in the app is: if a rule references the whole composite package (e.g.
azure
) without specifying a concrete integration (e.g.activitylogs
), we show such related integration as not installed. Example:This works
There's an exception from this: if a rule references the whole package that only contains a single integration of the same name (e.g.
system
), then it works and we show it as installed:Schema of a related integration
When we built the related integrations feature, we added support for single-integration packages like
windows
andsystem
, but not composite integrations likeaws
andazure
: