Skip to content
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

[Serverless][Security Solution] Unfriendly error message when creating an invalid exception #168213

Closed
MadameSheema opened this issue Oct 6, 2023 · 11 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience consider-next fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:Serverless Work as part of the Serverless project for its initial release QA:Validated Issue has been validated by QA Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.12.0

Comments

@MadameSheema
Copy link
Member

Describe the bug:

  • Unfriendly error message when creating an invalid exception

Kibana/Elasticsearch Stack version:

  • Serverless production

Steps to reproduce:

  1. Navigate to Rules > Shared exceptions lists
  2. Create an exception list
  3. Add a rule exception to it
  4. Fill the Exception name
  5. Add the Conditions
  6. Add a long comment
  7. Click on Add rule exception

Current behavior:

Screenshot 2023-10-06 at 14 25 53
  • It is not clear why the creation of the exception failed.

Expected behavior:

  • The error message should be more descriptive about what is happening. I.E: The Comments field has exceeded the supported lenthg
    OR
  • Before clicking the Add rule exception some sort of validation should be performed letting the user know in advanced if the information entered is correct or not.

Additional information:

  • The same behaviour happens when instead of a creation an edition is performed.
  • This issue was found during the testing spike, the same behavior it might happen on ESS.
@MadameSheema MadameSheema added bug Fixes for quality problems that affect the customer experience triage_needed Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Project:Serverless Work as part of the Serverless project for its initial release Team:Detection Engine Security Solution Detection Engine Area labels Oct 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@yctercero yctercero removed their assignment Oct 13, 2023
@MikePaquette MikePaquette added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Oct 24, 2023
@e40pud
Copy link
Contributor

e40pud commented Nov 7, 2023

After discussion with @yctercero we decided to fix the issue by limiting the length of the comment to 30K characters. We took same approach as used in Cases. User will not be allowed to create/edit exception with the comment longer than 30K and validation error will be shown.

Screenshot 2023-11-07 at 16 47 10

e40pud added a commit to e40pud/kibana that referenced this issue Nov 7, 2023
e40pud added a commit that referenced this issue Nov 8, 2023
… exception (#168213) (#170764)

## Summary

Addresses #168213

With this PR we limit the length of the comments in exceptions to 30K
characters. We took same approach as used in Cases. User will not be
allowed to create/edit exception with the comment longer than 30K and
validation error will be shown.

Right now if user tries to add a very long comment (above 32K
characters) the server throws an exception due to the length limitation
of the `keyword` type.

After the fix, user will see a validation error on putting very long
text as a comment

<img width="1294" alt="Screenshot 2023-11-07 at 16 47 10"
src="https://github.com/elastic/kibana/assets/2700761/16c284a8-ab63-45d7-80dd-e50f48a3f5e2">
@e40pud e40pud added the fixed label Nov 8, 2023
@e40pud
Copy link
Contributor

e40pud commented Nov 8, 2023

@MadameSheema this bug was fixed and merged into the main branch. Ready to be tested!

@yctercero
Copy link
Contributor

@MadameSheema @e40pud maybe we should start confirming fixes and such on main and serverless production?

@e40pud
Copy link
Contributor

e40pud commented Nov 9, 2023

@yctercero good idea, will make sure that QA we test changes before they go into the main!

@cybersecdiva cybersecdiva added the QA:Validated Issue has been validated by QA label Nov 22, 2023
@cybersecdiva
Copy link

Tested in Serverless Production Enviorment

Serverless Project:

Project: keep_security-solutions-testing

Preconditions:

  • Alerts generated in Serverless Project

Describe the bug:

Unfriendly message when creating an exception in Serveless

Steps to reproduce:

  1. In Serverless Project Navigate to Security --> Alerts
  2. Select an alert and right click for actions and Add rule exception or Add endpoint exception if it is an Endpoint alert
  3. Fill in necessary fields (exception rule name, comment field: (enter a long comment) )
  4. In the comment section, enter a long comment (this can be accomplished by entering a few words and copy and paste repetitively)
  5. Save exception
  6. Observe if error message is displayed

Current behavior

Error message is not displayed when creating an exception with a long character length in comments

Expected behavior:

Error message is not displayed when creating an exception with a long character length in comments

Observations:

I have tested in the Serverless Environment in Project and there is no error message that currently displays when creating either a rule or endpoint exception for a comment with a long character length

Screenshots of behavior:

Screenshot of exception with the long character comment:

Screenshot 2023-11-21 at 7 03 18 PM

Conclusion:

  • Tested and behavior is fixed QA validated ✅ fixed in Serverless Environment with no errors

  • @MadameSheema and @e40pud FYI Updated Observations closing marking as QA Validated ✅ cross reference for Detection Engine Project Board for QA Check ✅

@MadameSheema
Copy link
Member Author

@cybersecdiva thanks for taking a look at the issue, but the validation performed was incorrect, so with the description provided during the testing process, we cannot assure that the bug has been correctly fixed and the fix is already available in the QA environment.

As described, the issue was originally reported because the text of the displayed error was not user-friendly, not because an error was displayed. If you check the expected behavior, we are expecting an error message to be displayed.

I'll reopen the ticket because the fix is still pending to be validated.

@MadameSheema MadameSheema reopened this Nov 22, 2023
@MadameSheema MadameSheema removed the QA:Validated Issue has been validated by QA label Nov 22, 2023
@e40pud
Copy link
Contributor

e40pud commented Nov 22, 2023

@MadameSheema to fix this issue we prevented user from adding comments longer than 30k characters. This will assure that we do not see the error message like shown in the description. Instead we gonna see the validation error during typing the comment like shown here #168213 (comment)

@cybersecdiva
Copy link

cybersecdiva commented Nov 28, 2023

@MadameSheema Thank you for the update and for the clarification. I see now that I misread based on the error handling message. I have retested (with over 33k+ characters) this and it aligns with @e40pud 's comment - the number of 30k character limitation validation error that shows up.
As demonstrated here:

Screenshot 2023-11-28 at 3 37 50 PM

@vgomez-el vgomez-el added the QA:Validated Issue has been validated by QA label Jan 25, 2024
@vgomez-el
Copy link

vgomez-el commented Jan 25, 2024

I can assess that the bug is fixed as @e40pud has described on his comment:

@MadameSheema to fix this issue we prevented user from adding comments longer than 30k characters. This will assure that we do not see the error message like shown in the description. Instead we gonna see the validation error during typing the comment like shown here #168213 (comment)

@cybersecdiva Is also right on her second validation:

@MadameSheema Thank you for the update and for the clarification. I see now that I misread based on the error handling message. I have retested (with over 33k+ characters) this and it aligns with @e40pud 's comment - the number of 30k character limitation validation error that shows up. As demonstrated here:

Screenshot 2023-11-28 at 3 37 50 PM

User now cannot create more than 30K character length comments, and it prevents the issue to happen:

REC-20240125122044.mp4

I will close this issue and consider it validated on 8.12 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience consider-next fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Project:Serverless Work as part of the Serverless project for its initial release QA:Validated Issue has been validated by QA Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.12.0
Projects
None yet
Development

No branches or pull requests

7 participants