Skip to content

fix(slo): handle permission error - #167933

Merged
kdelemme merged 3 commits into
elastic:mainfrom
kdelemme:fix/slo-permission-error
Oct 5, 2023
Merged

kdelemme merged 3 commits into
elastic:mainfrom
kdelemme:fix/slo-permission-error

Conversation

@kdelemme

@kdelemme kdelemme commented Oct 3, 2023 •

Copy link
Copy Markdown
Contributor

Resolves #167924

🍒 Summary

This PR catches any security_exception error thrown by the transform install API, and return a 403 with the root cause message.
The react query hooks have been updated to handle any server error, and particularly show the error.body.message if any, or fallback to the error.message which is the related status message, e.g. Forbidden, Bad Request, ...

Small toast Larger toast With plain error
Screenshot 2023-10-03 at 3 41 14 PM Screenshot 2023-10-03 at 3 41 31 PM Screenshot 2023-10-03 at 4 10 35 PM

@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Feature:SLO v8.12.0 labels Oct 3, 2023
@kdelemme kdelemme self-assigned this Oct 3, 2023
@ghost

ghost commented Oct 3, 2023

Copy link
Copy Markdown

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kdelemme
kdelemme marked this pull request as ready for review October 3, 2023 20:12
@kdelemme
kdelemme requested a review from a team October 3, 2023 20:12
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@kibana-ci

Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 1.0MB 1.0MB +376.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kdelemme

@simianhacker simianhacker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

While reviewing this I found another bug that I documented in this issue: #168051

@kdelemme
kdelemme merged commit 335fc9b into elastic:main Oct 5, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Oct 5, 2023
@kdelemme
kdelemme deleted the fix/slo-permission-error branch October 5, 2023 13:17
kdelemme added a commit to kdelemme/kibana that referenced this pull request Oct 6, 2023
@kdelemme

kdelemme commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
✅ 8.11

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kdelemme added a commit to kdelemme/kibana that referenced this pull request Oct 6, 2023
kdelemme added a commit that referenced this pull request Oct 10, 2023
# Backport

This will backport the following commits from `main` to `8.11`:
- [fix(slo): handle permission error
(#167933)](#167933)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2023-10-05T13:17:32Z","message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:
Actionable
Observability","Feature:SLO","v8.12.0"],"number":167933,"url":"https://github.com/elastic/kibana/pull/167933","mergeCommit":{"message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167933","number":167933,"mergeCommit":{"message":"fix(slo):
handle permission error
(#167933)","sha":"335fc9b2409855f4aeebf360c0747141b2fcf03b"}},{"url":"https://github.com/elastic/kibana/pull/168231","number":168231,"branch":"8.10","state":"OPEN"}]}]
BACKPORT-->
dej611 pushed a commit to dej611/kibana that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:SLO release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.11.0 v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SLO] Improve error messages on permission issue

5 participants