-
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] Disables author
and license
fields in rule edit form for prebuilt rule types
#201887
[Security Solution] Disables author
and license
fields in rule edit form for prebuilt rule types
#201887
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
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.
@dplumlee Did you think about hiding the author
and license
fields for prebuilt rules? There is nothing users can do to unlock them.
...urity_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx
Outdated
Show resolved
Hide resolved
@maximpn I did it this way so the user could still see the info when they were editing the prebuilt rule if the context was needed but I guess I don't feel too strongly about it one way or the other. @ARWNightingale is there a preferred way to show/not show fields like these that can't be edited for prebuilt rules? |
@maximpn Not sure I understand, why would we want to hide these fields instead of disabling? I think by keeping these fields disabled we let the user know that they exist, have certain values, but are not editable. @ARWNightingale @approksiu do you have any opinion? We'd like to merge the PR early next week. |
@elasticmachine merge upstream |
It's a bit weird UX showing disabled fields to users when there is no way to unlock them. In that case we should display an explanation tooltip. On the other hand it's just simpler to hide them. Maybe @ARWNightingale and @approksiu have another opinion. |
@maximpn I think we should still show them disabled, it feels like the current consistent behaviour to do. I am working with platform to establish clear behaviour for disabled and hidden interactions but I dont have anything yet. |
Got your point. Do you think we need to display a tooltip explaining why the fields disabled? |
4464f4c
to
6ba0e5c
Compare
@maximpn, sorry yes absolutely for the tooltip, maybe something like |
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 form with a tooltip looks much better. Testing didn't reveal issues. Thanks @dplumlee 🙏
I left a minor comment.
...urity_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
Starting backport for target branches: 8.17, 8.x https://github.com/elastic/kibana/actions/runs/12165858860 |
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Async chunks
History
cc @dplumlee |
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 13fa525)
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 13fa525)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…se` fields in rule edit form for prebuilt rule types (#201887) (#203001) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)](#201887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Davis Plumlee","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-04T18:17:55Z","message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.17.0","v8.18.0"],"title":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types","number":201887,"url":"https://github.com/elastic/kibana/pull/201887","mergeCommit":{"message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201887","number":201887,"mergeCommit":{"message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Davis Plumlee <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…nse` fields in rule edit form for prebuilt rule types (#201887) (#203000) # Backport This will backport the following commits from `main` to `8.17`: - [[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)](#201887) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Davis Plumlee","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-04T18:17:55Z","message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.17.0","v8.18.0"],"title":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types","number":201887,"url":"https://github.com/elastic/kibana/pull/201887","mergeCommit":{"message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201887","number":201887,"mergeCommit":{"message":"[Security Solution] Disables `author` and `license` fields in rule edit form for prebuilt rule types (#201887)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/200251\r\n\r\n> [!NOTE] \r\n> This bug/related fix is only visible with the\r\n`prebuiltRulesCustomizationEnabled` feature flag turned on.\r\n\r\nDisables `author` and `license` fields in rule edit form for prebuilt\r\nrule types as we throw API errors when they are changed from the\r\nexisting rule value if the rule source is external.\r\n\r\n\r\n### Screenshots - the same prebuilt rule in the Rule edit form\r\n**Before**\r\n<img width=\"738\" alt=\"Screenshot 2024-11-26 at 5 32 00 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa\">\r\n\r\n\r\n**After**\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"13fa5259c8df89ff5a27fe0a8214b2eb01d7ed52"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Davis Plumlee <[email protected]>
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
…it form for prebuilt rule types (elastic#201887) ## Summary Fixes elastic#200251 > [!NOTE] > This bug/related fix is only visible with the `prebuiltRulesCustomizationEnabled` feature flag turned on. Disables `author` and `license` fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external. ### Screenshots - the same prebuilt rule in the Rule edit form **Before** <img width="738" alt="Screenshot 2024-11-26 at 5 32 00 PM" src="https://github.com/user-attachments/assets/6262cdb2-750a-47fb-b6b8-ec07f4acd8aa"> **After**  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Summary
Fixes #200251
Note
This bug/related fix is only visible with the
prebuiltRulesCustomizationEnabled
feature flag turned on.Disables
author
andlicense
fields in rule edit form for prebuilt rule types as we throw API errors when they are changed from the existing rule value if the rule source is external.Screenshots - the same prebuilt rule in the Rule edit form
Before

After

Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.