-
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
[Security Solution][Endpoint] Change Trusted Apps to use item_id
as its identifier and Enable Trusted Apps filtering by id in the UI
#115276
Conversation
…ow-trusted-apps-list-filter-by-ta-id
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
getting this out of Draft so I can get reviews on it. still not sure it will be merged - I want to think a little more about this change and if there are any impacts that i have not yet thought of. I will also fix the UT, but code is there |
…ow-trusted-apps-list-filter-by-ta-id
…ow-trusted-apps-list-filter-by-ta-id # Conflicts: # x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/list/policy_trusted_apps_list.tsx
): Promise<ExceptionListItemSchema | null> => { | ||
const trustedAppExceptionItem = await exceptionsListClient.getExceptionListItem({ | ||
itemId: id, | ||
id: undefined, |
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.
is this needed?
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.
Yeah, it is. The prop is defined as "required", and the value could be undefined
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.
got it 👍
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.
One thing to note that I learned with these changes - don't set id
to ''
because any value that is not undefined (string, even if empty) will take precedence over itemId
if defined. That had me debugging for a bit :)
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.
🐑 🎸
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.
🚀 🐑
exceptionsListClient: ExceptionListClient, | ||
{ id }: DeleteTrustedAppsRequestParams | ||
): Promise<void> => { | ||
const trustedAppExceptionItem = await findTrustedAppExceptionItemItemByIdOrItemId( |
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.
nitpick: typo? ...ItemItem...
should be perhaps ...ByIdOrItemId
? 🤔
@elasticmachine merge upstream |
…ow-trusted-apps-list-filter-by-ta-id
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
… its identifier and Enable Trusted Apps filtering by id in the UI (elastic#115276) * Add `item_id` to list of searchable fields * trusted apps api changes to use `item_id` instead of SO `id` * Change Policy Details Trusted App "View all details" action URL to show TA list filtered by the TA id
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
… its identifier and Enable Trusted Apps filtering by id in the UI (#115276) (#115509) * Add `item_id` to list of searchable fields * trusted apps api changes to use `item_id` instead of SO `id` * Change Policy Details Trusted App "View all details" action URL to show TA list filtered by the TA id Co-authored-by: Paul Tavares <[email protected]>
Summary
ExceptionListeItemSchema[item_id]
property value as the Trusted App identifier in order to better support API filteringChecklist