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]Container workload protection showing with None Access to Security Sub Features #163562

Closed
karanbirsingh-qasource opened this issue Aug 10, 2023 · 18 comments · Fixed by #165376
Assignees
Labels
8.10 candidate bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Cloud Security Cloud Security team related v8.9.0 v8.10.0

Comments

@karanbirsingh-qasource
Copy link

karanbirsingh-qasource commented Aug 10, 2023

Describe the bug:
Container workload protection showing with None Access to Security Sub Features

Kibana/Elasticsearch Stack version
Version: 8.10.0 SNAPSHOT
Commit: 4637b74
Build: 65796

Browser and Browser OS Version:
Firefox for windows OS
Version: 116.0.2 (64-bit)

Elastic Endpoint Version:
v8.10.0-dev.0

Original install method:
Build summary: https://artifacts-api.elastic.co/v1/search/8.10.0-SNAPSHOT

Functional Area:
Security App side Navigation

Initial Setup:

  • Create a custom rule with below kibana privilege (i.e Set Security to All , Security Sub Feature to None and Case to all)

image

image

Steps to reproduce

  • Navigate to Security App
  • Click on Setting Group
  • Observed that Cloud Posture Benchmarks page is showing under navigation which is incorrect
  • Click on Cloud Posture Benchmarks
  • Observed that page tries to load and in end the forbidden error is shown

Additional Observation

  • None

Current behavior

  • Container workload protection showing with None Access to Security Sub Features
  • Container workload protection tries to load however user should get instant forbidden banner

image

Expected behavior:

  • Rule Grouping navigation should not show when whole security sub-features is set to None Access

Screen-shots:

Settings.-.Kibana.Mozilla.Firefox.Private.Browsing.2023-08-10.13-35-28.mp4

image

Errors in browser console:

Console Logs

Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). manage:286:177238 XHRGET https://973747bc0ef84b97832d269c9bbdcd2d.us-central1.gcp.qa.cld.elstc.co:9243/internal/cloud_defend/status [HTTP/1.1 403 Forbidden 317ms]

XHRGET
https://973747bc0ef84b97832d269c9bbdcd2d.us-central1.gcp.qa.cld.elstc.co:9243/internal/cloud_defend/policies?policy_name=&per_page=10&page=1&sort_field=package_policy.name&sort_order=asc
[HTTP/1.1 403 Forbidden 327ms]

XHRGET
https://973747bc0ef84b97832d269c9bbdcd2d.us-central1.gcp.qa.cld.elstc.co:9243/internal/cloud_defend/status
[HTTP/1.1 403 Forbidden 344ms]

Any additional context (logs, chat logs, magical formulas, etc.):

Cloud_Posture_Benchmark_HAR.zip

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

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

@karanbirsingh-qasource karanbirsingh-qasource added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. v8.10.0 labels Aug 10, 2023
@karanbirsingh-qasource
Copy link
Author

@amolnater-qasource please review and assign

@amolnater-qasource
Copy link

Reviewed and assigned to @MadameSheema

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@semd
Copy link
Contributor

semd commented Aug 10, 2023

Rule Grouping navigation should not show when whole security sub-features is set to None Access

Not sure about that, I think Rules functionality is available as long as the main Security feature is enabled, it does not have any sub-feature associated.
I think that solving this one for the main feature will fix the issue

@maxcold
Copy link
Contributor

maxcold commented Aug 14, 2023

@karanbirsingh-qasource The bug talks about Cloud Posture Benchmarks but the screenshot and the "steps to reproduce" seem to be related to "Container Workload Protection". Did you mention "Cloud Posture Benchmarks" by mistake? Because for "Security > Rules > Cloud Posture Benchmarks" I couldn't reproduce such behavior but for "Security > Settings > Container Workload Protection" I surely can, even though I'm not sure if it's a bug or not. cc @mitodrummer

@karanbirsingh-qasource
Copy link
Author

yes @maxcold you are right, the bug is for Container workload protection not cloud posture benchmark.

we have updated the bug

@karanbirsingh-qasource karanbirsingh-qasource changed the title [Security Solution]Cloud Posture Benchmarks showing with None Access to Security Sub Features [Security Solution]Container workload protection showing with None Access to Security Sub Features Aug 14, 2023
@tehilashn tehilashn added the Team:Cloud Security Cloud Security team related label Aug 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@stephmilovic stephmilovic removed their assignment Aug 14, 2023
@mitodrummer mitodrummer self-assigned this Aug 15, 2023
@machadoum
Copy link
Member

machadoum commented Aug 17, 2023

@karanbirsingh-qasource could you check if it was fixed by #163102?
More details here

@machadoum machadoum self-assigned this Aug 17, 2023
@MadameSheema
Copy link
Member

@karanbirsingh-qasource @sukhwindersingh-qasource can you please validate the fix on latest BC? Thanks!

@karanbirsingh-qasource
Copy link
Author

Hi @MadameSheema

We have validated this issue on 8.10 BC2 and found the issue to be still occuring ❌ . Same error same state is shown in Container workload protection.

Kibana/Elasticsearch Stack version

Version: 8.10.0 BC2
Commit: fa3473f42d7c5e7a3c2d66026a153e01002f5d3c
Build: 66107

Screen-Cast:

Get.started.-.Kibana.Mozilla.Firefox.Private.Browsing.2023-08-25.09-48-05.mp4

@MadameSheema
Copy link
Member

@machadoum can you please take a look at the above? Thanks!

@machadoum
Copy link
Member

Hey!

I investigated the issue and discovered that it isn't new. I was able to reproduce it on 8.9
Screenshot 2023-08-25 at 10 08 38

It happens because the menu item is guarded by the general security show capability: capabilities: [${SERVER_APP_ID}.show] here

But when the page renders it has extra license checks here. So, it isn't related to the menu changes introduced by Sergi. One possible solution is to declare the license type to the link configuration:

const commonLinkProperties: Partial<LinkItem> = {
  hideTimeline: true,
  capabilities: [`${SERVER_APP_ID}.show`],
+ licenseType: 'enterprise',
};

But that can be better accessed by the security-defend-workflows team which owns the feature.

@machadoum machadoum added the Team:Defend Workflows “EDR Workflows” sub-team of Security Solution label Aug 25, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@machadoum machadoum added v8.9.0 Team: Cloud Native Integrations and removed Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Defend Workflows “EDR Workflows” sub-team of Security Solution labels Aug 25, 2023
@machadoum
Copy link
Member

machadoum commented Aug 25, 2023

Maybe I pinged the wrong team. It seems it was introduced here by cloud-native-integrations.
By the PR comments, it looks like this behaviour is intended.
Ping: @elastic/sec-cloudnative-integrations @elastic/sec-linux-platform

@norrietaylor
Copy link
Member

Thanks for the ping @machadoum!

Kibana work that was owned by @elastic/sec-cloudnative-integrations now should go to @elastic/cloud-security

@kfirpeled is this on your radar?

@mitodrummer
Copy link
Contributor

mitodrummer commented Aug 31, 2023

Maybe I pinged the wrong team. It seems it was introduced here by cloud-native-integrations. By the PR comments, it looks like this behaviour is intended. Ping: @elastic/sec-cloudnative-integrations @elastic/sec-linux-platform

PR is up, needs an approval from security-threat-hunting-explore team. cc @machadoum

mitodrummer added a commit that referenced this issue Sep 5, 2023
…to csp), also add… (#165376)

…ed d4c manage policies link to the list of excluded links when user
does not have permission to read policies in security solution

## Summary

Fixes: #163562
mitodrummer added a commit to mitodrummer/kibana that referenced this issue Sep 5, 2023
…to csp), also add… (elastic#165376)

…ed d4c manage policies link to the list of excluded links when user
does not have permission to read policies in security solution

## Summary

Fixes: elastic#163562
(cherry picked from commit 7e82607)

# Conflicts:
#	x-pack/packages/security-solution/features/src/constants.ts
#	x-pack/packages/security-solution/features/src/security/kibana_features.ts
mitodrummer added a commit to mitodrummer/kibana that referenced this issue Sep 5, 2023
…to csp), also add… (elastic#165376)

…ed d4c manage policies link to the list of excluded links when user
does not have permission to read policies in security solution

## Summary

Fixes: elastic#163562
(cherry picked from commit 7e82607)

# Conflicts:
#	x-pack/packages/security-solution/features/src/constants.ts
#	x-pack/packages/security-solution/features/src/security/kibana_features.ts
mitodrummer added a commit that referenced this issue Sep 5, 2023
…imilar to csp), also add… (#165376) (#165717)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Cloud Security] added missing bits for backend route check (similar
to csp), also add…
(#165376)](#165376)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Karl
Godard","email":"karl.godard@elastic.co"},"sourceCommit":{"committedDate":"2023-09-05T14:44:54Z","message":"[Cloud
Security] added missing bits for backend route check (similar to csp),
also add… (#165376)\n\n…ed d4c manage policies link to the list of
excluded links when user\r\ndoes not have permission to read policies in
security solution\r\n\r\n## Summary\r\n\r\nFixes:
#163562
Security","backport:prev-minor","v8.10.0","v8.11.0"],"number":165376,"url":"#165376
Security] added missing bits for backend route check (similar to csp),
also add… (#165376)\n\n…ed d4c manage policies link to the list of
excluded links when user\r\ndoes not have permission to read policies in
security solution\r\n\r\n## Summary\r\n\r\nFixes:
#163562
Security] added missing bits for backend route check (similar to csp),
also add… (#165376)\n\n…ed d4c manage policies link to the list of
excluded links when user\r\ndoes not have permission to read policies in
security solution\r\n\r\n## Summary\r\n\r\nFixes:
#163562"}}]}]
BACKPORT-->
@mitodrummer
Copy link
Contributor

fix and backport merged to 8.10 so will be ready for QA in the next BC

bryce-b pushed a commit to bryce-b/kibana that referenced this issue Sep 19, 2023
…to csp), also add… (elastic#165376)

…ed d4c manage policies link to the list of excluded links when user
does not have permission to read policies in security solution

## Summary

Fixes: elastic#163562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.10 candidate bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Cloud Security Cloud Security team related v8.9.0 v8.10.0
Projects
None yet