[Security Solution] Give notice when endpoint policy is out of date#83469
[Security Solution] Give notice when endpoint policy is out of date#83469pzl merged 14 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
d20d4f3 to
94e0e69
Compare
|
Pinging @elastic/ingest-management (Team:Ingest Management) |
4f426cd to
de1efb5
Compare
x-pack/plugins/security_solution/common/endpoint/types/index.ts
Outdated
Show resolved
Hide resolved
045c0ef to
28c39d3
Compare
...s/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx
Show resolved
Hide resolved
|
|
||
| outOfDates.forEach((item, index) => { | ||
| expect(item.textContent).toEqual('Out-of-date'); | ||
| expect(item.querySelector(`[data-euiicon-type][color=warning]`)).not.toBeNull(); |
x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/utils.ts
Show resolved
Hide resolved
x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts
Outdated
Show resolved
Hide resolved
| return { | ||
| getAgentStatusById: statusFn, | ||
| }; | ||
| }); |
There was a problem hiding this comment.
Do we have to do the casting, this is a suggested alternative. Here we set the mocks, this is just an example.
endpointAppContextService.start({
...createMockEndpointAppContextServiceStartContract(),
...{ agentPolicyService: mockAgentPolicyService, agentService: mockAgentService },
});
There was a problem hiding this comment.
the casting I had to do to get access to the jest properties. Since through the few levels of mocked interfaces, it's returning real types, though mocked objects.
But this was enough to allow me to just mock the things I need, e.g. on line 178:
agentPolicyMock.mockImplementation(() => {
return {
id: policyID,
revision: policyRev,
};
});
and differently on 198
agentPolicyMock.mockImplementation(() => {
return {
package_policies: [
{
package: { name: 'endpoint' },
id: policyID,
revision: policyRev,
},
],
};
});
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* master: (67 commits) [Observability] Load hasData call asynchronously (elastic#80644) Implement AnonymousAuthenticationProvider. (elastic#79985) Deprecate `visualization:colorMapping` advanced setting (elastic#83372) [TSVB] [Rollup] Table tab not working with rollup indexes (elastic#83635) Revert "[Search] Search batching using bfetch (elastic#83418)" (elastic#84037) skip flaky suite (elastic#83772) skip flaky suite (elastic#69849) create kbn-legacy-logging package (elastic#77678) [Search] Search batching using bfetch (elastic#83418) [Security Solution] Refactor Timeline flyout to take a full page (elastic#82033) Drop use of console-stamp (elastic#83922) skip flaky suite (elastic#84011 , elastic#84012) Fixed usage of `isReady` for usage collection of alerts and actions (elastic#83760) [maps] support URL drilldowns (elastic#83732) Revert "Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226)" [code coverage] Update jest config to collect more data (elastic#83804) Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226) [Security Solution] Give notice when endpoint policy is out of date (elastic#83469) [Security Solution] Sync url state on any changes to query string (elastic#83314) [CI] Initial TeamCity implementation (elastic#81043) ...
Summary
Give a visual indicator that an endpoint's current policy is out-of-date, and expecting to be updated.
changes to API response:
{ "hosts": [ { "host_status": "offline", "metadata": { ... }, "policy_info": { "agent": { "applied": { "id": "632f4680-25d0-11eb-95f2-4d677aabe46b", "revision": 5 }, "configured": { "id": "632f4680-25d0-11eb-95f2-4d677aabe46b", "revision": 5 } }, "endpoint": { "id": "77fcc567-fe1b-4e20-8add-045a41ab0e5d", "revision": 1 } }, "query_strategy_version": "v2" } ], "query_strategy_version": "v2", "request_page_index": 0, "request_page_size": 10, "total": 1 }the
policy_infokey, being enriched for each endpoint recordChecklist
Delete any items that are not applicable to this PR.
For maintainers