Open sophiec20 opened 2 years ago
Pinging @elastic/security-solution (Team: SecuritySolution)
Thanks @sophiec20 ! We'll take a look in 8.4 as we prepare some updates to the lists plugin.
@sophiec20 so the error shown is being thrown by ES when trying to set the policy. It does not seem that Kibana supports this either (not just a security solution thing).
When I try to create the policy via stack management, I am prevented and prompted with an error about the name being too long. Are you seeing other areas in Kibana that do allow it?
The policy name limit probably existed long before Spaces did. The disconnect stems from the fact that Elasticsearch is not aware of Spaces, as this is a Kibana construct.
I did not do an exhaustive review of areas which allow, disallow or error with long Space names. It was a while ago; from recollection I think that dashboards and visualisations etc still worked fine. I just saw the error in the Security app initial load which I found by accident.
Personally, I'd like to see some sensible limits set on the Kibana space name length. Having a friendly, human-readable, short and succinct space name is fairly useful when namespacing elasticsearch objects. Plus, there is already a Space description which could be used for verbose text.
@rylnd I think that my PR does fix this for the lists indices. I tried it out by creating a space with the following name:
puppy-kitty-ipsum-dolor-sit-good-dog-foot-stick-canary--teeth-mittens-grooming-vaccine-walk-swimming-nest-good-boy-furry-tongue-heel-furry-treats-fish--cage-run-fast-kitten-dinnertime-ball-run-foot-park-fleas-throw-house-train-licks-stick-dinnertime-window--yawn-litter-fish-yawn-toy-pet-gate-throw-buddy-kitty-wag-tail-ball-groom-crate-ferret-heel-wet-nose-rover-toys-pet-supplies--bird-food-treats-tongue-lick-teeth-ferret-litter-box
Didn't get the error @sophiec20 saw, but not sure if I just didn't hit the same limit.
UPDATE: Nevermind, still got the policy error.
Pinging @elastic/security-detections-response (Team:Detections and Resp)
Validated this scenario with latest 8.15 BC.
Currently there is a 512 bytes limit for the space name:
Following the limit, a new space created with a long text as space name:
While launching the Security app we can observe an error is displayed:
https://github.com/user-attachments/assets/9f1402cd-3877-4824-b9b7-d6f4c3dd35b0
Same doesn't occur with custom spaces with medium size text as space names:
https://github.com/user-attachments/assets/22d0983c-bdb7-443e-b920-d01eedb159c9
Same doesn't occur with any other app within Kibana:
https://github.com/user-attachments/assets/41d86a04-73e9-4426-bd22-6948aa827b5e
Error logs: -- As per the error logs we observe that even not meeting the limit size, the space name could be saved.
{
"statusCode": 400,
"error": "Bad Request",
"message": "[Validation Failed: 1: id [index-pattern:security-solution-in-the-heart-of-a-bustling-city--there-was-an-old--forgotten-library--hidden-among-towering-skyscrapers--it-remained-a-sanctuary-for-those-seeking-solace-in-the-pages-of-books--the-library-s-vast-collection--accumulated-over-centuries--held-stories-of-distant-lands--ancient-myths--and-knowledge-long-lost-to-the-world--one-rainy-afternoon--a-young-woman-named-clara-stumbled-upon-the-library-while-seeking-shelter-from-the-storm--drawn-by-its-mysterious-aura--she-wandered-inside-] is too long, must be no longer than 512 bytes but was: 513;: action_request_validation_exception\n\tRoot causes:\n\t\taction_request_validation_exception: Validation Failed: 1: id [index-pattern:security-solution-in-the-heart-of-a-bustling-city--there-was-an-old--forgotten-library--hidden-among-towering-skyscrapers--it-remained-a-sanctuary-for-those-seeking-solace-in-the-pages-of-books--the-library-s-vast-collection--accumulated-over-centuries--held-stories-of-distant-lands--ancient-myths--and-knowledge-long-lost-to-the-world--one-rainy-afternoon--a-young-woman-named-clara-stumbled-upon-the-library-while-seeking-shelter-from-the-storm--drawn-by-its-mysterious-aura--she-wandered-inside-] is too long, must be no longer than 512 bytes but was: 513;]: Validation Failed: 1: id [index-pattern:security-solution-in-the-heart-of-a-bustling-city--there-was-an-old--forgotten-library--hidden-among-towering-skyscrapers--it-remained-a-sanctuary-for-those-seeking-solace-in-the-pages-of-books--the-library-s-vast-collection--accumulated-over-centuries--held-stories-of-distant-lands--ancient-myths--and-knowledge-long-lost-to-the-world--one-rainy-afternoon--a-young-woman-named-clara-stumbled-upon-the-library-while-seeking-shelter-from-the-storm--drawn-by-its-mysterious-aura--she-wandered-inside-] is too long, must be no longer than 512 bytes but was: 513;",
"attributes": {
"body": {
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: id [index-pattern:security-solution-in-the-heart-of-a-bustling-city--there-was-an-old--forgotten-library--hidden-among-towering-skyscrapers--it-remained-a-sanctuary-for-those-seeking-solace-in-the-pages-of-books--the-library-s-vast-collection--accumulated-over-centuries--held-stories-of-distant-lands--ancient-myths--and-knowledge-long-lost-to-the-world--one-rainy-afternoon--a-young-woman-named-clara-stumbled-upon-the-library-while-seeking-shelter-from-the-storm--drawn-by-its-mysterious-aura--she-wandered-inside-] is too long, must be no longer than 512 bytes but was: 513;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: id [index-pattern:security-solution-in-the-heart-of-a-bustling-city--there-was-an-old--forgotten-library--hidden-among-towering-skyscrapers--it-remained-a-sanctuary-for-those-seeking-solace-in-the-pages-of-books--the-library-s-vast-collection--accumulated-over-centuries--held-stories-of-distant-lands--ancient-myths--and-knowledge-long-lost-to-the-world--one-rainy-afternoon--a-young-woman-named-clara-stumbled-upon-the-library-while-seeking-shelter-from-the-storm--drawn-by-its-mysterious-aura--she-wandered-inside-] is too long, must be no longer than 512 bytes but was: 513;"
},
"status": 400
}
}
}
Kibana version: 8.2.0-SNAPSHOT
Describe the bug: Cannot use Security App with very long space names or .. Space names can be unusably long
Steps to reproduce:
Expected behavior:
I do not actually think we should support very long Space names because I suspect other things break (which is how I found this), but there is a mismatch here between what Kibana allows and what the Security App supports, therefore raising.
We could trap and provide a nicer error.
I also expected the
.list
and.item
indices to be hidden because of their naming convention.Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context: