-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Task/endpointlist actions #76555
Task/endpointlist actions #76555
Conversation
Pinging @elastic/endpoint-management (Team:Endpoint Management) |
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
Pinging @elastic/ingest-management (Team:Ingest Management) |
@@ -104,6 +104,7 @@ async function enroll(kibanaURL: string, apiKey: string, log: ToolingLog): Promi | |||
ip: '127.0.0.1', | |||
system: `${os.type()} ${os.release()}`, | |||
memory: os.totalmem(), | |||
elastic: { agent: { version: '8.0.0' } }, |
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.
maybe we can rely on kibana package.json version here?
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.
👍
@parkiino that's something that I was also planning to do in the pending PR that enhances our dev data generator loader utility
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.
ok good to know
@@ -52,6 +52,8 @@ export interface EndpointState { | |||
endpointPackageInfo?: GetPackagesResponse['response'][0]; | |||
/** tracks the list of policies IDs used in Host metadata that may no longer exist */ | |||
nonExistingPolicies: Record<string, boolean>; | |||
/** List of Agent Policies Ids*/ | |||
agentPolicies: Record<string, string>; |
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.
Maybe:
agentPolicies: Record<string, string>; | |
agentPolicies: PolicyIds['agentPolicy'] |
@@ -52,6 +52,8 @@ export interface EndpointState { | |||
endpointPackageInfo?: GetPackagesResponse['response'][0]; | |||
/** tracks the list of policies IDs used in Host metadata that may no longer exist */ | |||
nonExistingPolicies: Record<string, boolean>; | |||
/** List of Agent Policies Ids*/ |
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.
Can you expand the description here a bit. Maybe:
/** List of Agent Policies Ids*/ | |
/** A a list of Package Policy IDs (received via Endpoint metadata/policy response) mapped to associated Fleet parent Agent Config */ |
x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts
Show resolved
Hide resolved
x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx
Show resolved
Hide resolved
data-test-subj="hostLink" | ||
appId="securitySolution" | ||
appPath={`hosts/${item.metadata.host.hostname}`} | ||
href={`${services?.application?.getUrlForApp('securitySolution')}/hosts/${ |
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.
For the Security Solution URLs, I think methods exists (similar to the ones we have) that return both the path
and the href
. We should use those instead of building these paths manually
appPath={`#/policies/${ | ||
agentPolicies[item.metadata.Endpoint.policy.applied.id] | ||
}`} | ||
href={`${services?.application?.getUrlForApp('ingestManager')}#/policies/${ |
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.
I just found that Ingest also has a set of methods that allows us to get the path
to the different pages:
kibana/x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/page_paths.ts
Lines 59 to 84 in 3031e66
export const pagePathGetters: { | |
[key in StaticPage]: () => string; | |
} & | |
{ | |
[key in DynamicPage]: (values: DynamicPagePathValues) => string; | |
} = { | |
overview: () => '/', | |
integrations: () => '/integrations', | |
integrations_all: () => '/integrations', | |
integrations_installed: () => '/integrations/installed', | |
integration_details: ({ pkgkey, panel }) => | |
`/integrations/detail/${pkgkey}${panel ? `/${panel}` : ''}`, | |
policies: () => '/policies', | |
policies_list: () => '/policies', | |
policy_details: ({ policyId, tabId }) => `/policies/${policyId}${tabId ? `/${tabId}` : ''}`, | |
add_integration_from_policy: ({ policyId }) => `/policies/${policyId}/add-integration`, | |
add_integration_to_policy: ({ pkgkey }) => `/integrations/${pkgkey}/add-integration`, | |
edit_integration: ({ policyId, packagePolicyId }) => | |
`/policies/${policyId}/edit-integration/${packagePolicyId}`, | |
fleet: () => '/fleet', | |
fleet_agent_list: ({ kuery }) => `/fleet/agents${kuery ? `?kuery=${kuery}` : ''}`, | |
fleet_agent_details: ({ agentId, tabId }) => | |
`/fleet/agents/${agentId}${tabId ? `/${tabId}` : ''}`, | |
fleet_enrollment_tokens: () => '/fleet/enrollment-tokens', | |
data_streams: () => '/data-streams', | |
}; |
This however, does not seem to be exported at the ingest_manager/public
level, so we can't reference it just yet. but maybe we open a separate issue to use it and then refactor this here (and possibly other locations in our code) to use it?
cc:/ @jen-huang , @nchaulet 😬
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.
feel free to export and use this whenever :)
…a into task/endpointlist-actions
@@ -106,7 +109,7 @@ const endpointListApiPathHandlerMocks = ({ | |||
// Do policies referenced in endpoint list exist | |||
// just returns 1 single agent policy that includes all of the packagePolicy IDs provided | |||
[INGEST_API_AGENT_POLICIES]: (): GetAgentPoliciesResponse => { | |||
const agentPolicy = generator.generateAgentPolicy(); | |||
// const agentPolicy = generator.generateAgentPolicy(); |
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.
will remove this
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.
LGTM 👍
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
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.
LGTM 👍
🚀
|
||
// @ts-ignore |
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.
Interesting - what was the TS error?
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.
* master: (65 commits) [Security Solution][Resolver] Analyzed event styling (elastic#77115) filter invalid SOs from the searc hresults in Task Manager (elastic#76891) [RUM Dashboard] Visitors by region map (elastic#77135) [Security Solution][Endpoint][Admin] Task/endpoint list actions (elastic#76555) [Ingest pipelines] Forms for processors T-U (elastic#76710) updating datatable type (elastic#77320) [ML] Fix custom URLs processing for security app (elastic#76957) [telemetry] add schema guideline + schema_check new check for --path config (elastic#75747) [ML] Transforms: API schemas and integration tests (elastic#75164) [Mappings editor] Add support for wildcard field type (elastic#76574) [Ingest Manager] Fix flyout instruction selection (elastic#77071) [Telemetry Tools] update lodash to 4.17 (elastic#77317) [APM] Service inventory redesign (elastic#76744) Hide management sections based on cluster/index privileges (elastic#67791) [Snapshot Restore] Disable steps when form is invalid (elastic#76540) [Mappings editor] Add support for positive_score_impact to rank_feature (elastic#76824) Update apm.ts (elastic#77310) [OBS] Remove beta badge, change news feed size and add external icon to news feed link (elastic#77164) [Discover] Convert legacy sort to be compatible with multi sort (elastic#76986) [APM] API Snapshot Testing (elastic#77229) ...
* master: (65 commits) [Security Solution][Resolver] Analyzed event styling (elastic#77115) filter invalid SOs from the searc hresults in Task Manager (elastic#76891) [RUM Dashboard] Visitors by region map (elastic#77135) [Security Solution][Endpoint][Admin] Task/endpoint list actions (elastic#76555) [Ingest pipelines] Forms for processors T-U (elastic#76710) updating datatable type (elastic#77320) [ML] Fix custom URLs processing for security app (elastic#76957) [telemetry] add schema guideline + schema_check new check for --path config (elastic#75747) [ML] Transforms: API schemas and integration tests (elastic#75164) [Mappings editor] Add support for wildcard field type (elastic#76574) [Ingest Manager] Fix flyout instruction selection (elastic#77071) [Telemetry Tools] update lodash to 4.17 (elastic#77317) [APM] Service inventory redesign (elastic#76744) Hide management sections based on cluster/index privileges (elastic#67791) [Snapshot Restore] Disable steps when form is invalid (elastic#76540) [Mappings editor] Add support for positive_score_impact to rank_feature (elastic#76824) Update apm.ts (elastic#77310) [OBS] Remove beta badge, change news feed size and add external icon to news feed link (elastic#77164) [Discover] Convert legacy sort to be compatible with multi sort (elastic#76986) [APM] API Snapshot Testing (elastic#77229) ...
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…) (#77636) Endpoint list actions to security solution endpoint admin Co-authored-by: Paul Tavares <paul.tavares@elastic.co>
Summary
Issue: https://github.com/elastic/security-team/issues/115
gif doesn't include the last action, because the correct agent id wasn't grabbed when i mocked the data, the link works tho
Checklist
Delete any items that are not applicable to this PR.
For maintainers