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] Maintenance window is not displayed for non-admin users in Serverless #184151

Open
MadameSheema opened this issue May 23, 2024 · 9 comments
Assignees
Labels
8.16 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Project:Serverless Work as part of the Serverless project for its initial release 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.

Comments

@MadameSheema
Copy link
Member

MadameSheema commented May 23, 2024

Related to: #184160

Summary

Describe the bug:

  • Maintenance window is not displayed for non-admin users

Kibana/Elasticsearch Stack version:

  • Latest serverless

Initial context:

  • To have a maintenance window setup on a Security project

Steps to reproduce:

  1. Enter to the Security project where the maintenace window is set with a user with a role different from admin
  2. Navigate to the Rules page

Current behavior:

  • The maintenance window is not displayed

Expected behavior:

  • The maintenance window should be displayed for all the roles that have at least "read" permission in this table (internal).
  • The skipped Serverless test should be unskipped

Extra information:

  • This behaviour seems to be happening with all the built-in roles different from the admin one.

To do

Fix Security Solution's predefined roles in Serverless:

Code review might be needed from @dhurley14, because he is familiar with serverless roles area.

When the bug is fixed, in the same PR please unskip the corresponding test for the Maintenance Window callout: #184160.

@MadameSheema MadameSheema added bug Fixes for quality problems that affect the customer experience triage_needed Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Project:Serverless Work as part of the Serverless project for its initial release labels May 23, 2024
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@nikitaindik nikitaindik added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Detections and Resp Security Detection Response Team Team:Detection Rule Management Security Detection Rule Management Team labels May 23, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@nikitaindik
Copy link
Contributor

We have investigated the issue a bit together with @MadameSheema. Here's what we found:

This piece of code skips requesting active maintenance windows and causes the callout not to be shown:
https://github.com/elastic/kibana/blob/main/packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx#L57

  const isMaintenanceWindowDisabled =
    !capabilities[MAINTENANCE_WINDOW_FEATURE_ID].show &&
    !capabilities[MAINTENANCE_WINDOW_FEATURE_ID].save;

  const { data: activeMaintenanceWindows = [] } = useFetchActiveMaintenanceWindows(kibanaServices, {
    enabled: !isMaintenanceWindowDisabled,
  });

Checked locally. Looks like for all Serverless roles other than admin, both capabilities[MAINTENANCE_WINDOW_FEATURE_ID].show and capabilities[MAINTENANCE_WINDOW_FEATURE_ID].save are false.

I have no knowledge about capabilities and how they are related to Serverless roles. But you folks probably understand what's going on.

@cnasikas
Copy link
Member

To my understanding, this is only applicable to security solution. It seems that in packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml you do not give access to the MW feature to the roles. It seems to not be related to how the MW works.

@cnasikas cnasikas added Team:Security Solution Platform Security Solution Platform Team and removed Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels May 24, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-engine (Team:Security Solution Platform)

@cnasikas
Copy link
Member

cnasikas commented May 24, 2024

Btw maybe it is not a bug. Handling MWs is an administrative process and maybe a T1 analyst should not have access to them. It seems to me it is a product decision on which roles should have access to MW.

@banderror banderror added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team 8.15 candidate and removed triage_needed Team:Security Solution Platform Security Solution Platform Team labels May 24, 2024
@banderror banderror changed the title [Security Solution][Serverless] Maintenance window is not displayed for non-admin users [Security Solution] Maintenance window is not displayed for non-admin users in Serverless May 24, 2024
@banderror
Copy link
Contributor

@cnasikas Thank you for localizing the issue 🙏 I think it's a bug - we only show a callout in Security on the Rule Management page when there's a maintenance window currently active. So we'll need to fix our predefined roles in Serverless:

I assigned it to our team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.16 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Project:Serverless Work as part of the Serverless project for its initial release 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.
Projects
None yet
Development

No branches or pull requests

5 participants