-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
use roles.yml from kbn/es for security solution tests #201228
base: main
Are you sure you want to change the base?
use roles.yml from kbn/es for security solution tests #201228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @dmlemeshko ,
although our team initially created this module, we are no longer using it for Elastic Defend flows. Looking around at the files in the directory, looks like the following teams might be using it:
- Security Solution Cloud Security Posture team
- Security Solution cases team
- Maybe OSQuery - @tomsonpl or @szwarckonrad maybe you can check?
Thank you, Paul. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing this. I believe this change will not affect the current osquery Cypress tests, but to be safe, let’s run them before merging. Unless @tomsonpl sees any reason not to.
Good idea @szwarckonrad, let's wait for the test results and 🚢 🇮🇹 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's investigate failing osquery tests.
ADMIN = 'admin', // default Cloud role | ||
SUPERUSER = 'system_indices_superuser', // this role is used to clean up the environment only and should | ||
// not be used in any tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomsonpl @szwarckonrad This should fix the failures.
admin
is Cloud default role, available both in serverless and ess deployments. It is a role that org owner got assigned and completely valid one to use in tests. But obviously the goal is to test features with minimal required role and admin
is the last in the list.
system_indices_superuser
is temporary solution while some Security solution teams didn't fix their tests, e.g. cloud security posture API tests depend on it. This role does not exist on MKI and tests using it might fail on MKI. We have a plan to remove it asap, but for now it has to stay to unblock testing in Kibana CI.
Summary
I recently discovered that some Cypress tests has its own realm default roles in
x-pack/test_serverless/shared/lib/security/kibana_roles/project_controller_security_roles.yml
and I think it might be easy to support a single roles file shared across multiple test configs/frameworks and track changes update from controller.