Skip to content

[SecuritySolution] Add a privileges check callout to priv mon page#227176

Merged
machadoum merged 16 commits intoelastic:mainfrom
machadoum:siem-ea-13028
Jul 11, 2025
Merged

[SecuritySolution] Add a privileges check callout to priv mon page#227176
machadoum merged 16 commits intoelastic:mainfrom
machadoum:siem-ea-13028

Conversation

@machadoum
Copy link
Member

@machadoum machadoum commented Jul 9, 2025

Summary

Add a privileges check callout to priv mon page

Screenshot 2025-07-09 at 09 51 27
Screenshot 2025-07-09 at 09 52 13
Screenshot 2025-07-09 at 09 52 26

How to test

  1. On a kibana instance with an admin user
  2. Add priv mon data and install ML jobs
    2.1 Run the privileged-user-monitoring command from the security-documents-generator repo
  3. Open the priv mon page and make sure everything is displayed
  4. Create a test role with access to the data view indices but nothing more
  5. Create a user with the role
  6. Log in on an anonymous tab with the created user
  7. Open the privmon page
  8. The callout should be displayed
  9. If you add privileges to the indices listed in the callout, the callout should disappear, and the dashboard should be displayed without any errors

Checklist

Reviewers should verify this PR satisfies this list as well.

@machadoum machadoum self-assigned this Jul 9, 2025
@machadoum machadoum added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Entity Analytics Security Solution Entity Analytics features Team:Entity Analytics Security Entity Analytics Team backport:version Backport to applied version labels v9.1.0 labels Jul 9, 2025
@machadoum machadoum marked this pull request as ready for review July 9, 2025 10:28
@machadoum machadoum requested review from a team as code owners July 9, 2025 10:28
@machadoum machadoum requested a review from CAWilson94 July 9, 2025 10:28
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

Copy link
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is working 👍 Couple small comments

I wonder if we should make the rest of the page less broken though? E.g the risk score panel not in an error state and less toasts?

defaultMessage="You do not have the necessary permissions to enable or view the Asset Inventory. To access this feature, please contact your administrator to request the appropriate permissions."
/>
</p>
{privileges ? <MissingPrivilegesCallout privileges={privileges} /> : null}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just renamed the component

Copy link
Contributor

@maxcold maxcold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asset_inventory change looks good to me

Copy link
Contributor

@natasha-moore-elastic natasha-moore-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left one question and a couple of optional suggestions, thanks!

machadoum and others added 3 commits July 11, 2025 11:16
…ity_analytics/components/privileged_user_monitoring/index.tsx

Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com>
@machadoum machadoum enabled auto-merge (squash) July 11, 2025 09:32
@machadoum machadoum merged commit 4965cf5 into elastic:main Jul 11, 2025
13 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.1

https://github.com/elastic/kibana/actions/runs/16220671335

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 7685 7688 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.8MB 9.8MB +739.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 94.2KB 94.4KB +169.0B

History

cc @machadoum

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 11, 2025
…lastic#227176)

## Summary

Add a privileges check callout to priv mon page

![Screenshot 2025-07-09 at 09 51
27](https://github.com/user-attachments/assets/958b727c-9040-45e2-80cc-6ba63896d095)
![Screenshot 2025-07-09 at 09 52
13](https://github.com/user-attachments/assets/8bed4c90-6e59-47cd-9193-4e59ca8952ba)
![Screenshot 2025-07-09 at 09 52
26](https://github.com/user-attachments/assets/6af022b9-de6f-4967-8949-422fd223cafd)

### How to test
1. On a kibana instance with an admin user
2. Add priv mon data and install ML jobs
2.1 Run the `privileged-user-monitoring` command from the
`security-documents-generator` repo
3. Open the priv mon page and make sure everything is displayed
4. Create a test role with access to the data view indices but nothing
more
5. Create a user with the role
6. Log in on an anonymous tab with the created user
7. Open the privmon page
8. The callout should be displayed
9. If you add privileges to the indices listed in the callout, the
callout should disappear, and the dashboard should be displayed without
any errors

### Checklist

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com>
(cherry picked from commit 4965cf5)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 11, 2025
…age (#227176) (#227654)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[SecuritySolution] Add a privileges check callout to priv mon page
(#227176)](#227176)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-07-11T13:01:24Z","message":"[SecuritySolution]
Add a privileges check callout to priv mon page (#227176)\n\n##
Summary\n\nAdd a privileges check callout to priv mon
page\n\n\n\n![Screenshot 2025-07-09 at 09
51\n27](https://github.com/user-attachments/assets/958b727c-9040-45e2-80cc-6ba63896d095)\n![Screenshot
2025-07-09 at 09
52\n13](https://github.com/user-attachments/assets/8bed4c90-6e59-47cd-9193-4e59ca8952ba)\n![Screenshot
2025-07-09 at 09
52\n26](https://github.com/user-attachments/assets/6af022b9-de6f-4967-8949-422fd223cafd)\n\n\n###
How to test\n1. On a kibana instance with an admin user\n2. Add priv mon
data and install ML jobs\n2.1 Run the `privileged-user-monitoring`
command from the\n`security-documents-generator` repo\n3. Open the priv
mon page and make sure everything is displayed\n4. Create a test role
with access to the data view indices but nothing\nmore\n5. Create a user
with the role\n6. Log in on an anonymous tab with the created user\n7.
Open the privmon page\n8. The callout should be displayed\n9. If you add
privileges to the indices listed in the callout, the\ncallout should
disappear, and the dashboard should be displayed without\nany
errors\n\n\n\n### Checklist\n\nReviewers should verify this PR satisfies
this list as well.\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
natasha-moore-elastic
<137783811+natasha-moore-elastic@users.noreply.github.com>","sha":"4965cf54e23e276bd7f93e5fd713add8b8af9c13","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Feature:Entity Analytics","Team:Entity
Analytics","backport:version","v9.1.0","v9.2.0"],"title":"[SecuritySolution]
Add a privileges check callout to priv mon
page","number":227176,"url":"https://github.com/elastic/kibana/pull/227176","mergeCommit":{"message":"[SecuritySolution]
Add a privileges check callout to priv mon page (#227176)\n\n##
Summary\n\nAdd a privileges check callout to priv mon
page\n\n\n\n![Screenshot 2025-07-09 at 09
51\n27](https://github.com/user-attachments/assets/958b727c-9040-45e2-80cc-6ba63896d095)\n![Screenshot
2025-07-09 at 09
52\n13](https://github.com/user-attachments/assets/8bed4c90-6e59-47cd-9193-4e59ca8952ba)\n![Screenshot
2025-07-09 at 09
52\n26](https://github.com/user-attachments/assets/6af022b9-de6f-4967-8949-422fd223cafd)\n\n\n###
How to test\n1. On a kibana instance with an admin user\n2. Add priv mon
data and install ML jobs\n2.1 Run the `privileged-user-monitoring`
command from the\n`security-documents-generator` repo\n3. Open the priv
mon page and make sure everything is displayed\n4. Create a test role
with access to the data view indices but nothing\nmore\n5. Create a user
with the role\n6. Log in on an anonymous tab with the created user\n7.
Open the privmon page\n8. The callout should be displayed\n9. If you add
privileges to the indices listed in the callout, the\ncallout should
disappear, and the dashboard should be displayed without\nany
errors\n\n\n\n### Checklist\n\nReviewers should verify this PR satisfies
this list as well.\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
natasha-moore-elastic
<137783811+natasha-moore-elastic@users.noreply.github.com>","sha":"4965cf54e23e276bd7f93e5fd713add8b8af9c13"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227176","number":227176,"mergeCommit":{"message":"[SecuritySolution]
Add a privileges check callout to priv mon page (#227176)\n\n##
Summary\n\nAdd a privileges check callout to priv mon
page\n\n\n\n![Screenshot 2025-07-09 at 09
51\n27](https://github.com/user-attachments/assets/958b727c-9040-45e2-80cc-6ba63896d095)\n![Screenshot
2025-07-09 at 09
52\n13](https://github.com/user-attachments/assets/8bed4c90-6e59-47cd-9193-4e59ca8952ba)\n![Screenshot
2025-07-09 at 09
52\n26](https://github.com/user-attachments/assets/6af022b9-de6f-4967-8949-422fd223cafd)\n\n\n###
How to test\n1. On a kibana instance with an admin user\n2. Add priv mon
data and install ML jobs\n2.1 Run the `privileged-user-monitoring`
command from the\n`security-documents-generator` repo\n3. Open the priv
mon page and make sure everything is displayed\n4. Create a test role
with access to the data view indices but nothing\nmore\n5. Create a user
with the role\n6. Log in on an anonymous tab with the created user\n7.
Open the privmon page\n8. The callout should be displayed\n9. If you add
privileges to the indices listed in the callout, the\ncallout should
disappear, and the dashboard should be displayed without\nany
errors\n\n\n\n### Checklist\n\nReviewers should verify this PR satisfies
this list as well.\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
natasha-moore-elastic
<137783811+natasha-moore-elastic@users.noreply.github.com>","sha":"4965cf54e23e276bd7f93e5fd713add8b8af9c13"}}]}]
BACKPORT-->

Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…lastic#227176)

## Summary

Add a privileges check callout to priv mon page



![Screenshot 2025-07-09 at 09 51
27](https://github.com/user-attachments/assets/958b727c-9040-45e2-80cc-6ba63896d095)
![Screenshot 2025-07-09 at 09 52
13](https://github.com/user-attachments/assets/8bed4c90-6e59-47cd-9193-4e59ca8952ba)
![Screenshot 2025-07-09 at 09 52
26](https://github.com/user-attachments/assets/6af022b9-de6f-4967-8949-422fd223cafd)


### How to test
1. On a kibana instance with an admin user
2. Add priv mon data and install ML jobs
2.1 Run the `privileged-user-monitoring` command from the
`security-documents-generator` repo
3. Open the priv mon page and make sure everything is displayed
4. Create a test role with access to the data view indices but nothing
more
5. Create a user with the role
6. Log in on an anonymous tab with the created user
7. Open the privmon page
8. The callout should be displayed
9. If you add privileges to the indices listed in the callout, the
callout should disappear, and the dashboard should be displayed without
any errors



### Checklist

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: natasha-moore-elastic <137783811+natasha-moore-elastic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Entity Analytics Security Solution Entity Analytics features release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants