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][ENDPOINT] Handle Host list/details policy links to non-existing policies #73208

Conversation

paul-tavares
Copy link
Contributor

Summary

  • Creates new component for displaying the Host List/Details link to the Policy Details. This component will display just the policy name (not a link) if it finds that the policy no longer exists
  • Add a check to ensure that policy IDs in the Host list actually exist

Why:
When the Endpoint Policy is deleted, that action is immediate (Ingest Package Configuration is deleted), however the un-installing of the Endpoint (as a result of this delete action) may take a bit of time, during which it will continue to show up on the Endpoint Hosts list, and thus with invalid URLs to the Policy Details.

Checklist

@paul-tavares paul-tavares added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Endpoint Management Feature:Endpoint Elastic Endpoint feature v7.10.0 v7.9.0 labels Jul 24, 2020
@paul-tavares paul-tavares requested review from a team as code owners July 24, 2020 16:19
@paul-tavares paul-tavares self-assigned this Jul 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-management (Team:Endpoint Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-app-team (Feature:Endpoint)

hostResponse.hosts,
nonExistingPolicies(state)
)
.then((missingPolicies) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: I don't like that these then().catch() blocks are repeated below. Will look to improve in the future (maybe by passing along the dispatch method to the getNonexistingPoliciesForHostList() as an argument.

@paul-tavares
Copy link
Contributor Author

@elasticmachine merge upstream

@nnamdifrankie
Copy link
Contributor

Do you plan to backport this change?

@paul-tavares
Copy link
Contributor Author

@nnamdifrankie yes - tagged 7.9 ++ 7.10 😬

@kevinlog
Copy link
Contributor

pulled it down locally, working as expected

image

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
securitySolution 7.3MB +4.8KB 7.3MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@paul-tavares paul-tavares merged commit 6d4bb9d into elastic:master Jul 27, 2020
@paul-tavares paul-tavares deleted the task/EMT-634-handle-host-links-to-deleted-policy branch July 27, 2020 15:13
paul-tavares added a commit to paul-tavares/kibana that referenced this pull request Jul 27, 2020
…o non-existing policies (elastic#73208)

* Make API call to check policies and save it to store
* change policy list and details to not show policy as a link if it does not exist
paul-tavares added a commit to paul-tavares/kibana that referenced this pull request Jul 27, 2020
…o non-existing policies (elastic#73208)

* Make API call to check policies and save it to store
* change policy list and details to not show policy as a link if it does not exist
paul-tavares added a commit that referenced this pull request Jul 27, 2020
…o non-existing policies (#73208) (#73292)

* Make API call to check policies and save it to store
* change policy list and details to not show policy as a link if it does not exist
paul-tavares added a commit that referenced this pull request Jul 27, 2020
…o non-existing policies (#73208) (#73293)

* Make API call to check policies and save it to store
* change policy list and details to not show policy as a link if it does not exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Endpoint Elastic Endpoint feature release_note:skip Skip the PR/issue when compiling release notes v7.9.0 v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants