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

Vulnerability dashboard error loading for read only user #6993

Conversation

guidomodarelli
Copy link
Contributor

@guidomodarelli guidomodarelli commented Sep 13, 2024

Description

Vulnerability dashboard not working for read-only user

Issues Resolved

#6985

Evidence

image
image

Test

  1. Create a readonly user following these steps https://documentation.wazuh.com/4.9/user-manual/user-administration/rbac.html
  2. Ensure the Vulnerabilities detection in the Wazuh server is enabled and this can connect with the Wazuh indexer
  3. Ensure the vulnerabilities states index was created
  4. With a user with write permission on the selected tenant, go to Vulnerabilities Detection > Dashboard / Inventory, and it should create the index pattern
  5. Login with the readonly user and go to Vulnerabilities Detection > Dashboard / Inventory.
  6. The application should not be infinitely loading.

UNIT TESTS

image

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@guidomodarelli guidomodarelli changed the base branch from master to 4.9.1 September 13, 2024 13:02
@guidomodarelli guidomodarelli changed the title Bug/6985 vulnerability dashboard error loading for read only user Vulnerability dashboard error loading for read only user Sep 13, 2024
@guidomodarelli guidomodarelli self-assigned this Sep 13, 2024
@guidomodarelli guidomodarelli linked an issue Sep 13, 2024 that may be closed by this pull request
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 46.02% ( 400 / 869 )
Branches 41.97% ( 157 / 374 )
Functions 44.01% ( 136 / 309 )
Lines 46.22% ( 398 / 861 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 76.44% ( 172 / 225 )
Branches 58.65% ( 61 / 104 )
Functions 61.7% ( 29 / 47 )
Lines 76.44% ( 172 / 225 )

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 13.65% ( 4036 / 29558 )
Branches 9.1% ( 1757 / 19304 )
Functions 13.34% ( 950 / 7119 )
Lines 13.83% ( 3934 / 28441 )

Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

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

CR: 🟢
Test: 🟢

Read only user navigating to vulnerabilities

Peek 2024-09-16 19-00

Assigned role to readonly user

image

image

Copy link
Member

@Machi3mfl Machi3mfl left a comment

Choose a reason for hiding this comment

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

CR: ✅
Test: ✅

Screenshot 2024-09-16 at 16 11 42

@asteriscos asteriscos merged commit 952bf49 into 4.9.1 Sep 16, 2024
5 checks passed
@asteriscos asteriscos deleted the bug/6985-vulnerability-dashboard-error-loading-for-read-only-user branch September 16, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerability dashboard error loading for read-only user
3 participants