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

Refine privilege-checking UX in Index Management #77376

Open
cjcenizal opened this issue Sep 14, 2020 · 3 comments
Open

Refine privilege-checking UX in Index Management #77376

cjcenizal opened this issue Sep 14, 2020 · 3 comments
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@cjcenizal
Copy link
Contributor

Missing privileges for index actions should be surfaced

Per #76617, when you try to perform an action on an index without sufficient privileges (e.g. deleting an index as outlined in the linked issue), the UI shows a toast that says "Forbidden" but no other information. We can make this toast more helpful by surfacing the status code and message from the API:

{
  "statusCode":403,
  "error":"Forbidden",
  "message":"[security_exception] action [indices:admin/delete] is unauthorized for user [test] on indices [], this action is granted by the privileges [delete_index,manage,all]"
}

Surface missing cluster privileges for index templates

When the user is missing the required privileges for managing index templates they just see a 500 error:

image

We should incorporate the same privileges check used in component templates:

image

@cjcenizal cjcenizal added enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Sep 14, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@sebelga
Copy link
Contributor

sebelga commented Apr 26, 2021

I think this could be part of a dedicated workstream "Apps privileges".

Instead of patching Index management we could work on an reusable app interceptor component that would handle this globally and for any app.

Something like this

// Provide de http client through context to the app
<HttpRequestInterceptor>
  <App />
</HttpRequestInterceptor>
// or through prop
<HttpRequestInterceptor>
  {(httpClient) => <App httpClient={httpClient} />}
</HttpRequestInterceptor>

At this point we can globally handle 403 Forbidden errors and display a toast message. We can do anything really, we could have a link in the toast to open a flyout and explain what privileges are required and how to enable them.

The same approach could be used for handling errors in license. We could have a link to the License management to upgrade the license.

@alisonelizabeth alisonelizabeth removed the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Sep 17, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 17, 2024
@alisonelizabeth alisonelizabeth added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more and removed Feature:Index Management Index and index templates UI needs-team Issues missing a team label labels Sep 17, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@alisonelizabeth alisonelizabeth added the Feature:Index Management Index and index templates UI label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

4 participants