Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Prebuilt rules' Related Integrations: Microsoft Office 365 are shown as not installed (0/1) in Rules UI #150968

Open
nicpenning opened this issue Feb 13, 2023 · 19 comments
Assignees
Labels
8.18 candidate bug Fixes for quality problems that affect the customer experience Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Feature:Related Integrations Security Solution Detection Rules Related Integrations feature impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. sdh-linked Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.7.0

Comments

@nicpenning
Copy link

Describe the bug:
Quite a few O365 rules are showing not installed and the link will navigate the user to: https://kibana/app/integrations/detail/o365-1.3.0/overview

image

Kibana/Elasticsearch Stack version:
8.6.1
Server OS version:
Windows Server 2016
Browser and Browser OS versions:
Latest Chrome or Edge
Elastic Endpoint version:
N/A
Original install method (e.g. download page, yum, from source, etc.):
Download Page -> Extract -> Execute
Functional Area (e.g. Endpoint management, timelines, resolver, etc.):
Detection Rules
Steps to reproduce:

  1. Have the latest rules and integrations installed
  2. Notice the integrations show as not installed.

Current behavior:
Rules are showing the integrations are missing
Expected behavior:
Rules should show the integrations are installed.
Screenshots (if relevant):
image

image

@nicpenning nicpenning added bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed labels Feb 13, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@MadameSheema MadameSheema added Team:Detections and Resp Security Detection Response Team Team:Detection Rule Management Security Detection Rule Management Team labels Feb 16, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@spong spong assigned spong and unassigned banderror Feb 20, 2023
@spong spong added v8.7.0 Feature:Related Integrations Security Solution Detection Rules Related Integrations feature and removed triage_needed labels Feb 20, 2023
@banderror banderror added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area labels Feb 22, 2023
spong added a commit that referenced this issue Mar 1, 2023
…ed or enabled when they actually are (#152055)

## Summary

Resolves: #142081
#149970
#150968

By adding an initial query for installed integrations and augments the
existing `InstalledIntegrationArray` constructed using
`PackagePolicy`'s. Also removes `version` from the `packageKey` when
calculating installed integrations as there can be mis-matches between
different policy versions and the integration itself, and I believe the
intended behavior here is to not have multiple `relatedIntegrations`
returned for different versions. We may want to expand the response here
to include all the different policy versions that exist (and perhaps #
of agents assigned the policy).

Lastly, updates `getIntegrationsInfoFromPolicy()` to also pull the base
`package` details in addition to the policy_template details, as this is
what ensure base packages show as `Installed: enabled` if they have an
integration policy assigned (vs just showing as `Installed` like when
there isn't an integration policy).

Note: This PR also adds the `getPackages()` method to the
`PackageClient` as it didn't currently exist, and was only available via
the fleet API via the `/api/fleet/epm/packages` route.


### Before:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221066781-be7aa1c6-1728-4200-98b2-d40946e48bbe.png"
/>
</p>



### After
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221323469-e24081f9-0741-41fd-8227-9e319c98b0d3.png"
/>
</p>


---------

Co-authored-by: Georgii Gorbachev <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 1, 2023
…ed or enabled when they actually are (elastic#152055)

## Summary

Resolves: elastic#142081
elastic#149970
elastic#150968

By adding an initial query for installed integrations and augments the
existing `InstalledIntegrationArray` constructed using
`PackagePolicy`'s. Also removes `version` from the `packageKey` when
calculating installed integrations as there can be mis-matches between
different policy versions and the integration itself, and I believe the
intended behavior here is to not have multiple `relatedIntegrations`
returned for different versions. We may want to expand the response here
to include all the different policy versions that exist (and perhaps #
of agents assigned the policy).

Lastly, updates `getIntegrationsInfoFromPolicy()` to also pull the base
`package` details in addition to the policy_template details, as this is
what ensure base packages show as `Installed: enabled` if they have an
integration policy assigned (vs just showing as `Installed` like when
there isn't an integration policy).

Note: This PR also adds the `getPackages()` method to the
`PackageClient` as it didn't currently exist, and was only available via
the fleet API via the `/api/fleet/epm/packages` route.

### Before:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221066781-be7aa1c6-1728-4200-98b2-d40946e48bbe.png"
/>
</p>

### After
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221323469-e24081f9-0741-41fd-8227-9e319c98b0d3.png"
/>
</p>

---------

Co-authored-by: Georgii Gorbachev <[email protected]>
(cherry picked from commit b833b10)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 1, 2023
…ed or enabled when they actually are (elastic#152055)

## Summary

Resolves: elastic#142081
elastic#149970
elastic#150968

By adding an initial query for installed integrations and augments the
existing `InstalledIntegrationArray` constructed using
`PackagePolicy`'s. Also removes `version` from the `packageKey` when
calculating installed integrations as there can be mis-matches between
different policy versions and the integration itself, and I believe the
intended behavior here is to not have multiple `relatedIntegrations`
returned for different versions. We may want to expand the response here
to include all the different policy versions that exist (and perhaps #
of agents assigned the policy).

Lastly, updates `getIntegrationsInfoFromPolicy()` to also pull the base
`package` details in addition to the policy_template details, as this is
what ensure base packages show as `Installed: enabled` if they have an
integration policy assigned (vs just showing as `Installed` like when
there isn't an integration policy).

Note: This PR also adds the `getPackages()` method to the
`PackageClient` as it didn't currently exist, and was only available via
the fleet API via the `/api/fleet/epm/packages` route.

### Before:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221066781-be7aa1c6-1728-4200-98b2-d40946e48bbe.png"
/>
</p>

### After
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221323469-e24081f9-0741-41fd-8227-9e319c98b0d3.png"
/>
</p>

---------

Co-authored-by: Georgii Gorbachev <[email protected]>
(cherry picked from commit b833b10)
@banderror banderror added the fixed label Mar 1, 2023
@banderror
Copy link
Contributor

Fixed by #152055

@ghost
Copy link

ghost commented Mar 6, 2023

Hi @banderror

We were trying to regress this issue and on enabling the Microsoft 365 Unusual Volume of File Deletion Rule the related integration under it is showing as not installed and on clicking on it we have to fill in some manade field to install this integration.

so can you please share the what field value to put in in order to enable the related integration and regress this issue.

image

image

Rules.-.Kibana.Mozilla.Firefox.2023-03-06.11-09-23.mp4

@ghost
Copy link

ghost commented Mar 6, 2023

Hi @banderror

Just for update on adding test under the mandate field, we are able to add the integration to the policy and after that we are getting Related integration as installed ✔️ .

image

@banderror
Copy link
Contributor

@karanbirsingh-qasource Great. You can put anything in this field, it doesn't matter for the code that shows related integrations and their installation status.

@MadameSheema
Copy link
Member

Awesome!! Can we close the ticket @karanbirsingh-qasource @banderror?

@banderror banderror added the QA:Validated Issue has been validated by QA label Mar 7, 2023
@banderror
Copy link
Contributor

@karanbirsingh-qasource Please reopen if needed

@ghost
Copy link

ghost commented Mar 9, 2023

thanks @banderror for the confirmation 👍

bmorelli25 pushed a commit to bmorelli25/kibana that referenced this issue Mar 10, 2023
…ed or enabled when they actually are (elastic#152055)

## Summary

Resolves: elastic#142081
elastic#149970
elastic#150968

By adding an initial query for installed integrations and augments the
existing `InstalledIntegrationArray` constructed using
`PackagePolicy`'s. Also removes `version` from the `packageKey` when
calculating installed integrations as there can be mis-matches between
different policy versions and the integration itself, and I believe the
intended behavior here is to not have multiple `relatedIntegrations`
returned for different versions. We may want to expand the response here
to include all the different policy versions that exist (and perhaps #
of agents assigned the policy).

Lastly, updates `getIntegrationsInfoFromPolicy()` to also pull the base
`package` details in addition to the policy_template details, as this is
what ensure base packages show as `Installed: enabled` if they have an
integration policy assigned (vs just showing as `Installed` like when
there isn't an integration policy).

Note: This PR also adds the `getPackages()` method to the
`PackageClient` as it didn't currently exist, and was only available via
the fleet API via the `/api/fleet/epm/packages` route.


### Before:
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221066781-be7aa1c6-1728-4200-98b2-d40946e48bbe.png"
/>
</p>



### After
<p align="center">
<img width="500"
src="https://user-images.githubusercontent.com/2946766/221323469-e24081f9-0741-41fd-8227-9e319c98b0d3.png"
/>
</p>


---------

Co-authored-by: Georgii Gorbachev <[email protected]>
@nicpenning
Copy link
Author

FYI, the 0/1 integrations installed is still a problem when navigating to the rules.

image

Inside of the rules and hovering it shows it is installed but not at a glance.
image

@nicpenning
Copy link
Author

@karanbirsingh-qasource Pinging for visibility.

@nicpenning
Copy link
Author

FYI - Running version 8.9.0 and latest version of the integration 1.17.1

@banderror
Copy link
Contributor

Thanks @nicpenning, and sorry for that. Would you mind updating the description with the fresh info, such as the versions you mentioned and anything else you think could be helpful? For instance, it could be useful to know how many integration policies you have created for Microsoft 365, how many agent policies include these integration policies, how many agents are assigned to these policies, etc. Any screenshots or screen recordings, etc.

@banderror banderror reopened this Aug 24, 2023
@banderror banderror removed fixed QA:Validated Issue has been validated by QA labels Aug 24, 2023
@nicpenning nicpenning changed the title [Security Solution] Prebuilt rules' Related Integrations: Microsoft Office 365 are shown as not installed [Security Solution] Prebuilt rules' Related Integrations: Microsoft Office 365 are shown as not installed (0/1) in Rules UI Aug 24, 2023
@nicpenning
Copy link
Author

Current state:
Version 8.9.0 of the stack however the 1 agent running the integration is 8.8.2 with the Microsoft 365 integration (1.20.1)
This same host has 19 other integrations on it.

Upon upgrading, it also states that there are 0 agents with a policy that has this integration. This has been an issue also for quite some time (we have never seen this work on some integrations).

image

After upgrade, proof we have this integration in a policy
image

This shows the M365 Integration installed.
image

But another issue with this is that the assets do not show under the assets tab either. This is an increasing issue across our integrations.
image
image

@ebonybubbles
Copy link

Issue with UI where an integration is installed and I believe to be enabled because it is assigned to an agent and successfully ingesting data, however it is still only showing up as "installed" and the integration ticker is still only showing "0/1". I have attached a screen grab as well.

image

@jkelas
Copy link
Contributor

jkelas commented Dec 27, 2024

Hi @nicpenning
I couldn't reproduce the issue on the latest main today.
Please see the screenshots below.

My procedure was:

  1. Install All Rules
  2. Filter Rules by 365
  3. Click one of them, and from the Rule Details Page click the Microsoft Office 365 Integration and install it (fully, not just assets, however without adding to agent)
  4. The Microsoft Office 365 Integrations shows as Enabled, both on the Rule Details Page, and on the Installed Rules page

Note: I am doing this on Mac, not Windows. I don't think this plays a role here, however I am not 100% sure.

@nicpenning Please check if you can reproduce the error. This bug was reported in Feb 2023.

Image

Image

FYI @banderror

@nicpenning
Copy link
Author

I will take a look.

I think the main issue was that the integrations previously were version specific. So if you were running 1.12.0 for example, the integration was looking for 1.3.0 specifically as mentioned in my initial post.

@jkelas
Copy link
Contributor

jkelas commented Dec 30, 2024

@nicpenning Thank you. Looking forward to seeing your observations on this one.

@jkelas
Copy link
Contributor

jkelas commented Dec 30, 2024

@banderror When working on ticket 152408 I noticed that the ticket originated from a PR 152055 which declares to be fixing this issue. I thought that this might be the reason why I am not able to reproduce it today, buy I discovered that in this PR 178295 we stopped using this endpoint /fleet/integrations/installed and introduced a new one, /fleet/integrations/all. The implementation is different which might explain why the bug is no longer reproducible. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate bug Fixes for quality problems that affect the customer experience Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Feature:Related Integrations Security Solution Detection Rules Related Integrations feature impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. sdh-linked Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.7.0
Projects
None yet
Development

No branches or pull requests

7 participants