Open andrew-goldstein opened 1 year ago
Pinging @elastic/security-solution (Team: SecuritySolution)
Pinging @elastic/response-ops (Team:ResponseOps)
The role setup does not have all required privileges
According to https://www.elastic.co/guide/en/security/current/detections-permissions-section.html, it needs cluster privilege manage
and index privilege manage
, which were not added in 11 step of reproduction. When I added manage
to both index and cluster, it started to work as expected.
The component, responsible to display warning, is out of date: https://github.com/elastic/kibana/blob/8.11/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/use_missing_privileges.ts#L14
It checks for wrong privileges on index and seems does do any checks on cluster privilege. So, as solution I see, we need to update that component with the right index privileges and also start to show missing cluster privilege as well
Pinging @elastic/security-detections-response (Team:Detections and Resp)
A user reported they received an unexpected error (detailed below) while uploading a value list when both of the following are true:
When this issue occurs, the following
400
(bad request) error is displayed:The error above appears in the screenshot below:
Workaround
To workaround for this error / issue:
Login to the Kibana space as a superuser (e.g. the
elastic
user)Import a value list to the space while logged in as a superuser
Logout the superuser
Login to Kibana as a user with fewer permissions (to the same space)
Import a value list (to the same space) as a user with fewer permissions
Kibana/Elasticsearch Stack version:
8.8.2
main
A user reported this issue in Kibana version
8.8.2
. The error may also be reproduced inmain
via a local Kibana development environment, per the50
reproduction steps in this issue.Steps to reproduce:
Login to the
Default
space as theelastic
userNavigate to
Stack Management
Click
Spaces
Click
Create space
Enter the following space name:
try_again
Click
Create space
to create thetry_again
spaceIn
Stack Management
, clickRoles
Click
Create role
Enter the following role name:
testing_value_list_role
In the
Index privileges / Indices
section ofCreate role
, enter the followingIndices
:Index privileges / Privileges
section ofCreate role
, enter the followingPrivileges
:In the
Kibana
section ofCreate role
, clickAdd Kibana privilege
In the
Kibana privileges
flyout, select thetry_again
spaceIn the
Kibana privileges
flyout, clickBulk actions
>All
, to grantCustom
access to a featuresExpected result:
Kibana privileges
flyout looks like the following screenshot:Add Kibana privilege
Expected result:
Add Kibana privilege
flyout is closed, theCreate role
page now looks like the following screenshot:Create role
buttonExpected result:
testing_value_list_role
role is savedIn
Stack Management
, clickUsers
In
Users
, clickCreate user
Enter the following username:
testing_value_list
Enter and confirm a password
Select the
testing_value_list_role
from theRoles
dropdownClick
Create user
Expected result:
testing_value_list
user with thetesting_value_list_role
is createdLog out
theelastic
user from KibanaLogin to Kibana as the new
testing_value_list
userNavigate to
Security
>Alerts
Click
Manage rules
Click
Import value lists
Expected result:
Import value lists
flyout is displayedClick the
Select or drag and drop a file
buttonOn your local file system, create a file named
joe_list.csv
, with the following contents:Select the
joe_list.csv
file in the web browser'sOpen
dialog, then click theOpen
buttonIn the
Import value lists
flyout, selectIP addresses
from theType of value list
dropdownExpected result:
Import value lists
flyout is looks like the following screenshot:Open the browser's developer tools
Navigate to the browser developer tools
Network
tabClear the
Network
tab's history of previous requestsClick the
Import value list
buttonExpected result:
joe_list.csv
is created for thetesting_value_list
user in thetry_again
spaceActual results:
There was an error uploading the value list.
appears, as shown in the following screenshot:The error toast includes the following message:
To import a list item, the data steam must exist first. Data stream ".lists-try_again" does not exist (400)
appears, per the previous screenshotIn the The
Network
tab, thePOST
request tohttp://localhost:5601/s/try_again/api/lists/items/_import?type=ip
returned a400
(bad request) status codeSee the full error
Expected result:
per the following screenshot:
On the local file system, make a copy of the file
joe_list.csv
. Name the new filetuesdays.csv
.Log out
thetesting_value_list
user from KibanaOnce again, login to Kibana as the
elastic
(superuser)Select the
try_again
spaceNavigate to
Security
>Alerts
Click
Manage rules
Click
Import value lists
Click the
Select or drag and drop a file
buttonSelect the
tuesdays.csv
file, then clickOpen
In the
Import value lists
flyout, selectIP addresses
from theType of value list
dropdownClick the
Import value list
buttonExpected results:
POST
request tohttp://localhost:5601/s/try_again/api/lists/items/_import?type=ip
returned a200
(success) status codetuesdays.csv
file was created for theelastic
user, per the screenshot below:Log out
theelastic
user from KibanaOnce again, Login to Kibana as the new
testing_value_list
userOne more time, attempt to upload
joe_list.csv
as thetesting_value_list
userExpected result:
joe_list.csv
is created for thetesting_value_list
userjoe_list.csv
, created by thetesting_value_list
user, andtuesdays.csv
, created by the elastic user, existNote that the issue may only be reproduced ONCE per newly created space. The issue may NOT be reproduced again for the same space, even that space is deleted, and another space with the same name is (re)created.
Server side error thrown from
import_list_item_route.ts
The error appears to be thrown by the following code in
x-pack/plugins/lists/server/routes/list/import_list_item_route
:The above was determined by adding the following
console.trace
to the code above:The following
console.trace
was logged (on the server):