-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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][Artifacts][Trusted Apps] Wildcard warning with IS operator for trusted apps creation/editing #175356
[Security Solution][Artifacts][Trusted Apps] Wildcard warning with IS operator for trusted apps creation/editing #175356
Conversation
hey @parkiino this looks good to me, but wondering if we should keep the same blue color for the "Add" button (vs changing it red per screen shots). Let me know if you feel differently. cc @dasansol92 |
I also think it should be blue for a save action confirmation. let me know what do you think. |
i can adjust this to have more space |
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.
The changes to the ArtifactListPage and Trusted apps looks good.
Are the changes done to kbn-securitysolution-*
packages need for this PR which is only changing the TrustedApps form (which I don't think uses the forms from the packages you changed)
anyway, approving and deferring the review of those packages to the code owners of them
operator: <strong>Change the operator</strong>, | ||
matches: <strong>matches</strong>, |
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.
these strings values need to be i18n
as well
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 had one test fix that should be incorporated, and I agree with the i18n comments.
I had a nit about some react control flow stuff, but that isn't pressing.
Just fix that test and i18n and this should be good on DE's side!
@@ -120,6 +125,13 @@ export const AutocompleteFieldMatchComponent: React.FC<AutocompleteFieldMatchPro | |||
[setError, onError] | |||
); | |||
|
|||
const handleWarning = useCallback( | |||
(warn: Warning | undefined): void => { | |||
onWarning(warn !== 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.
So if one were to pass onWarning
to this component, but not warning
, the parent setWarningsExist
is always going to be false
and nothing will happen, right? Is that the intended behavior?
The control flow here is a little odd; if the component is accepting onWarning
I would expect the rendering of the warning to be the parent's responsibility, but it seems like it's not (or is helpText={warning}
something else?).
I guess this all works for now, so nothing's needed to be done, but I wonder if this architecture might be causing some extra renders 🤔
packages/kbn-securitysolution-utils/src/path_validations/index.test.ts
Outdated
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
… operator for trusted apps creation/editing (elastic#175356) ## Summary - [x] Adds updated warning messaging for trusted apps entries that use wildcards `*?` with the "IS" operator - [x] Three different warnings: callout, individual entry item warnings and a final confirmation modal when the user tries to add a trusted app with ineffective IS / wildcard combination etnry. - [x] Unit tests # Screenshots <img width="829" alt="image" src="https://github.com/elastic/kibana/assets/56409205/c7beec62-a249-4535-ac0b-34f9be57f542"> <img width="1649" alt="image" src="https://github.com/elastic/kibana/assets/56409205/22f38f1b-7e6b-4b69-8d03-4d74d8674fa6"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
… operator for trusted apps creation/editing (elastic#175356) ## Summary - [x] Adds updated warning messaging for trusted apps entries that use wildcards `*?` with the "IS" operator - [x] Three different warnings: callout, individual entry item warnings and a final confirmation modal when the user tries to add a trusted app with ineffective IS / wildcard combination etnry. - [x] Unit tests # Screenshots <img width="829" alt="image" src="https://github.com/elastic/kibana/assets/56409205/c7beec62-a249-4535-ac0b-34f9be57f542"> <img width="1649" alt="image" src="https://github.com/elastic/kibana/assets/56409205/22f38f1b-7e6b-4b69-8d03-4d74d8674fa6"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
… operator for trusted apps creation/editing (elastic#175356) ## Summary - [x] Adds updated warning messaging for trusted apps entries that use wildcards `*?` with the "IS" operator - [x] Three different warnings: callout, individual entry item warnings and a final confirmation modal when the user tries to add a trusted app with ineffective IS / wildcard combination etnry. - [x] Unit tests # Screenshots <img width="829" alt="image" src="https://github.com/elastic/kibana/assets/56409205/c7beec62-a249-4535-ac0b-34f9be57f542"> <img width="1649" alt="image" src="https://github.com/elastic/kibana/assets/56409205/22f38f1b-7e6b-4b69-8d03-4d74d8674fa6"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
*?
with the "IS" operatorScreenshots