-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SLO] hide service details link for read only users #170731
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not the correct behaviour. We should show the button regardless of SLO read or write capabilities. Having SLO read capability should allow customers to debug and investigate issues, therefore allowing them to go into the APM service is expected/mandatory.
The only capability that could be used for showing or not this button might be the read/write APM capability. I'm saying could because I'm not even sure we should check APM related capabilities from here. IMO, we should let APM handles its access control when the user lands on the APM application. If the user experience they provide is not great, I believe we should open an issue for them to fix (with a redirection or something else)
@kdelemme You are right, this is not the right behavior. The |
The link is simply hidden from the menu, but it still exists. I'm still not sure we should handle apm capability from observability/SLO but that's not a battle I'm ready to die on the hill for 😀 |
@kdelemme Yep I know the link still exists, but I am trying to imagine what the workflow would be for the user.
Anyway this is really an edge case, having a user with read only access to SLO and none for APM. I created an issue for APM and they decide how/if they can fix on their side. |
@kdelemme I think it makes more sense to handle it when linking to an app rather than having the app show an error page. It's just frustrating to the user if we give them a navigation option that results in an error. I dont think we should be thinking about app boundaries here either - if this was part of the Observability app (or the SLO app), would you also link to a page that results in error? |
Thanks @dgieselaar for taking the time to give your input. That being said, I'm fine handling this from our app, as it avoids an unnecessary error being displayed to the less privileged user when they try to access that link directly from our app, but IMO that's a bandage e.g. a link from an alert message will still result in an error for less privileged users.
I think this is different because in that case we own the capability and the app. We know when we change them, and can keep them in sync. But nothing prevents APM to decide that now the minimum permission must be Anyway, I think it's too much philosophical discussion for the size of the fix, let's get it done and move on 😄 |
@kdelemme I don't think it's a bandaid. We really shouldn't create links (anywhere, but especially not in the UI) that lead to error states. I'm also not sure whether APM is not handling this correctly. From the code it looks like this is a platform level decision (and "application not found" is consistent with the fact that we e.g. return 404s on API routes the user does not have access to).
This can still be handled by APM or platform exposing an API that will tell you whether the user has access to this link. It shouldn't land on the user's plate to deal with this. |
Agree! But relying on an API provided by the destination app is very different than relying on a the raw capability boolean. |
@dgieselaar Thanks for the input. As part of the PR I will check the raw APM capability and when/if APM team decides to provide such an API, then we can switch to using the API. |
@@ -202,6 +203,7 @@ export function HeaderControl({ isLoading, slo }: Props) { | |||
<EuiContextMenuItem | |||
key="exploreInApm" | |||
icon="bullseye" | |||
disabled={!hasApmReadCapabilities} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to show tooltip around on why button is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I could, it would look like this. Does the text look good to you?

My only concern is that we don't show tooltips to the rest disabled icons. But this one I guess is different from the rest, cause it's the only one related to apm privileges and not SLO privileges.
@maciejforcone What do you think? Shall I show the tooltip in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of disabling the entire "Actions" button if there are no available actions for the user (with limited permissions, like in this scenario).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maciejforcone Good idea! 'll merge current PR as it is to have the bug fixed and I will disable the Actions button in another PR with a few tests I want to cover.
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @mgiota |
Fixes #170610