-
Notifications
You must be signed in to change notification settings - Fork 195
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
[META] Changes to host and user risk score features #2477
Comments
Hi @nastasha-solomon, we are also adding a feature called "alert enrichments" where we store and display the entity (host/user) risk score. Here is the PR. I was wondering if that should be tracked as part of this github issue or if a separate one should be created. |
@peluja1012 thanks for pinging us about this! I think a separate doc issue is better for organization purposes. This doc issue is mainly for describing what changed in the host and user risk score onboarding/upgrading workflows. Correct me if I'm wrong, but it seem as though the docs for the new alert enrichments feature should describe the type of host/user risk data that's displayed on the Alert details flyout after the host/user risk score features are enabled. |
Hey @nastasha-solomon, yes that's correct. |
Users can enable both risk scores from Entity Analytics page Users can enable host risk score from hosts / host details Users can enable host risk score via dev tools by visiting the url (The content will be appended to the bottom of the end of current content, please make sure you scroll to the bottom to find the content): e.g.
Users can enable user risk score users / users details Users can enable user risk score via dev tools by visiting the url (The content will be appended to the bottom of the end of current content, please make sure you scroll to the bottom to find the content): e.g.
Feature flags are removed in this release. As long as users have platinum (or above) or trial license, they can access the feature. IMPORTANT: If users have kibana configuration set in pre 8.5, they have to remove this before upgrading to 8.5 or it will failed. Users must remove https://github.com/elastic/security-team/issues/4935
Before this releases, all the scripts and ingest pipelines were created to share across spaces. If users installed the module for more than one space, make sure they reindex for all the spaces if they want to keep the old data before starting upgrading for any single space.
Common error during installation:
Users risk score creates these three scripts: ml_userriskscore_levels_script_{spaceId}, ml_userriskscore_map_script_{spaceId}, ml_userriskscore_reduce_script_{spaceId} We use create stored update stored script api to create the scripts. Users must have the manage cluster privilege to use this API. Note: If users had any stored scripts with the same id as above before installation, they will be updated (without showing error).
Hosts risk score creates this ingest pipeline: ml_hostriskscore_ingest_pipeline_{spaceId} We use create or update pipeline api to create the ingest pipelines. Users must have the manage cluster privilege to use this API.
Hosts risk score creates these indices: ml_host_risk_score_{spaceId}, ml_host_risk_score_latest_{spaceId} We use create index api to create the indices. Users must have the create_index or manage index privilege for the target index.
Hosts risk score creates these transforms: ml_hostriskscore_pivot_transform_{spaceId}, ml_hostriskscore_latest_transform_{spaceId} We use create transform api to create the transforms. This Requires the following privileges: cluster: manage_transform (the transform_admin built-in role grants this privilege)
We import saved objects and the end of the installation. To access Saved Objects, you must have the required Saved Objects Management Kibana privilege. It creates a tag Hosts risk score creates: Users risk score creates:
No. all the docs are linked to It'd be great if we could put the reference of error message somewhere obvious on the page, or please let me know if we have a particular page for it. |
No risk score data available to display - installation was finished without error but transforms haven't piked up data. Please check your injected data and alerts data is available: We rely on transforms to generate data for host / user risk score. The transforms we installed for host risk score are (please check /app/management/data/transform and find the relevant transforms are displayed as
The transforms we installed for user risk score are (please check /app/management/data/transform and find the relevant transforms are displayed as started):
To know if there's data generated for host risk score, we can do some queries over these indices:
To know if there's data generated for user risk score, we can do some queries over these indices:
If no data returns from When we have no data in The source indices of ml_host_risk_score_{{space_id}} and ml_user_risk_score_{{space_id}} is .alerts-security.alerts-{{space_id}}, so we might want to check if there's data when ml_hostriskscore_pivot_transform_{space_id} and ml_userriskscore_pivot_transform_{space_id} are trying to pick up data. If you are checking for ml_hostriskscore_pivot_transform_{space_id}:
If you are checking for ml_userriskscore_pivot_transform_{space_id}:
You might have a response like:
And then use the value of the
for example:
If no response return, please check if alerts are generated properly. If data exists, please restart transforms. |
During the installation / upgrading process, if there's any error message below:
Please manually delete the module and enable it again: Manually delete the module:
You can also delete transforms via dev tools:
You can also delete ingest pipeline via dev tools:
Hosts risk score: ml_hostriskscore_levels_script_{spaceId}, ml_hostriskscore_init_script_{spaceId}, ml_hostriskscore_map_script_{spaceId}, ml_hostriskscore_reduce_script_{spaceId}
Users risk score: ml_userriskscore_levels_script_{spaceId}, ml_userriskscore_map_script_{spaceId}, ml_userriskscore_reduce_script_{spaceId}
|
@nastasha-solomon Is there an open PR for this yet? We also have this old, and now outdated documentation for this feature in detection-rules. We would like to make the official documentation as exhaustive as possible so users don't have to look in multiple places- hopefully we can include everything Angela has detailed above in the main docs? |
@jmikell821 per our conversation linking the documentation task for 8.5 breaking changes |
Known issue: @jmikell821 please include the known issue to the doc if it's ok, thank you! In 8.5, all the actions are done by client side requests, so it takes a while to enable / upgrade the module. We have a fix in 8.6 for that to move most of the actions to the server side, this will reduce the time for enable / upgrade process. The main differences are: We do all the actions for creating indices, (an) ingest pipeline, transforms to a single api, which displayed as risk_score in the network panel (the 1st one), and creating saved objects remain in |
Thank you, @angorayc ! We'll make sure this gets doc' in the 8.5 release notes and will keep an eye on it when 8.6 rolls around. cc: @benironside |
https://github.com/elastic/detection-rules/blob/main/docs/experimental-machine-learning/host-risk-score.md and https://github.com/elastic/detection-rules/blob/main/docs/experimental-machine-learning/user-risk-score.md we might want to clarify in these two pages are for pre v8.5 only. The content on the github pages are no longer true in 8.5, so it’s good to always point users to elastic docs. Just in case users landing on those two github pages somehow, could we add some notice on the github page says that it’s deprecated in 8.5 and point them to https://www.elastic.co/guide/en/security/master/host-risk-score.html or https://www.elastic.co/guide/en/security/master/user-risk-score.html |
@angorayc Any reason why we're asking users to delete everything in case of a conflict? I'm also unable to think of a situation when this would occur. Could you please elaborate on what you're thinking here? |
As the current process continue even if error occurs in the middle of the process For example, the script continues to the end even if ingest pipeline conflict happens in the middle of the process. Indices and transforms will still be created, if they don't delete everything, then next time they might see indices already exists and transforms already exists. Therefore delete everything should be the safest way to avoid that. |
Description
In 8.5, improvements were made to the onboarding workflow for the host and user risk score features. These changes streamline previously complicated steps that required some technical knowledge and sometimes took users outside of the Security app. Now, users can enable both features and generate risk scores with a single click.
In addition, users can upgrade host and user risk score features in a single click. The Upgrade button will be display anywhere host and user risk scores are available. This includes the:
The following sections outline changes to the host and user risk score features in addition to caveats that may need to be doc'd.
Host risk score
Changes introduced in 8.5:
ml_{host|user}_risk_score_{spaceId}
andml_${host|user}_risk_score_latest_{spaceId}
indices. Here is an example reindexing request:User risk score
Changes introduced in 8.5:
Related issues/PRs
NOTE: The PR description contains useful videos that demo what happens when users enable and upgrade the features.
Additional notes/questions:
The deployment has three spaces for a quick view and we can add new spaces. Please note that we've been asked to not add data, enable or upgrade any of the spaces. (Please create a new space if you'd like to try it out)
The text was updated successfully, but these errors were encountered: