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

[Synthetics] adjust permissions for private locations #152037

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Feb 23, 2023

Summary

Resolves #150725

Adds Integrations: All permissions requirement for interacting with Private locations

A user without permissions
Screen Shot 2023-02-23 at 3 26 15 PM
Screen Shot 2023-02-23 at 3 26 06 PM
Screen Shot 2023-02-23 at 3 26 01 PM
Screen Shot 2023-02-23 at 2 36 02 PM
Screen Shot 2023-02-23 at 1 16 38 PM
Screen Shot 2023-02-23 at 12 28 08 PM

A user with permissions
Screen Shot 2023-02-23 at 1 22 11 PM

Testing

  1. Create a user with the following permissions
Index: synthetics-*: read
Kibana: Uptime/Synthetics: All. Integrations: All
  1. Log in as that user
  2. Navigate to Private locations in Synthetics settings. Confirm the add agent button is disabled and the need permission notice appears
  3. Log in as a super user, create a private location
  4. Log out, log in as the regular Uptime user
  5. Navigate to Private locations in Synthetics settings. Confirm the create location button is disabled and the need permission notice appears

@dominiqueclarke dominiqueclarke force-pushed the fix/synthetics-private-location-permissions branch from 2275437 to 4abef55 Compare February 27, 2023 16:19
@dominiqueclarke dominiqueclarke force-pushed the fix/synthetics-private-location-permissions branch from 4abef55 to 3947dfe Compare February 27, 2023 16:43
@dominiqueclarke dominiqueclarke changed the title synthetics - adjust permissions for private locations [Synthetics] adjust permissions for private locations Feb 27, 2023
@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0 release_note:skip Skip the PR/issue when compiling release notes v8.7.0 labels Feb 27, 2023
@dominiqueclarke
Copy link
Contributor Author

@florent-leborgne I'm not sure when to use the word permissions and when to use the word privileges.

@dominiqueclarke dominiqueclarke marked this pull request as ready for review February 27, 2023 16:48
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner February 27, 2023 16:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

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

LGTM with some small suggestions. "Privilege" seems to be the correct term to use for Kibana.

@dominiqueclarke
Copy link
Contributor Author

LGTM with some small suggestions. "Privilege" seems to be the correct term to use for Kibana.

@florent-leborgne You'll notice in the heading for the callout, we use the word 'Permissions' instead of 'Privileges'. Is this correct?

@florent-leborgne
Copy link
Contributor

@dominiqueclarke Oh I'm sorry, I missed that text in the PR review. We should use privileges as well. We could replace "Need permissions" with "You're missing some Kibana privileges to use private locations" or something along those lines ('use' could be 'manage').

For reference: Kibana privileges docs

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

LGTM !!

Thank you for clarifying these permissions !!

@kibana-ci
Copy link
Collaborator

💚 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
synthetics 1.4MB 1.4MB +553.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

History

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

@dominiqueclarke dominiqueclarke merged commit d86f2f8 into elastic:main Mar 1, 2023
@dominiqueclarke dominiqueclarke deleted the fix/synthetics-private-location-permissions branch March 1, 2023 00:40
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 1, 2023
## Summary

Resolves elastic#150725

Adds `Integrations: All` permissions requirement for interacting with
Private locations

A user without permissions
<img width="1500" alt="Screen Shot 2023-02-23 at 3 26 15 PM"
src="https://user-images.githubusercontent.com/11356435/221023579-adc41aa9-2a57-4d97-89ef-048b757a3442.png">
<img width="354" alt="Screen Shot 2023-02-23 at 3 26 06 PM"
src="https://user-images.githubusercontent.com/11356435/221023582-7025f9f7-068d-4d86-af2b-4699f51322d8.png">
<img width="359" alt="Screen Shot 2023-02-23 at 3 26 01 PM"
src="https://user-images.githubusercontent.com/11356435/221023585-fb53b3fb-39e6-4340-b2dc-709168e66fc5.png">
<img width="1510" alt="Screen Shot 2023-02-23 at 2 36 02 PM"
src="https://user-images.githubusercontent.com/11356435/221023588-582aa339-f14b-405c-86e8-8e22df5b9527.png">
<img width="1521" alt="Screen Shot 2023-02-23 at 1 16 38 PM"
src="https://user-images.githubusercontent.com/11356435/221023590-2634a673-90a9-4e52-9725-4a2a50fa400e.png">
<img width="1509" alt="Screen Shot 2023-02-23 at 12 28 08 PM"
src="https://user-images.githubusercontent.com/11356435/221023592-7acd7bcc-8dd7-40ba-a563-e84e0a0f1e92.png">

A user with permissions
<img width="1520" alt="Screen Shot 2023-02-23 at 1 22 11 PM"
src="https://user-images.githubusercontent.com/11356435/221023589-1cca1bf4-c9b5-4776-887d-73eb07b73862.png">

### Testing

1. Create a user with the following permissions
```
Index: synthetics-*: read
Kibana: Uptime/Synthetics: All. Integrations: All
```
2. Log in as that user
3. Navigate to Private locations in Synthetics settings. Confirm the add
agent button is disabled and the need permission notice appears
4. Log in as a super user, create a private location
5. Log out, log in as the regular Uptime user
6. Navigate to Private locations in Synthetics settings. Confirm the
create location button is disabled and the need permission notice
appears

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
(cherry picked from commit d86f2f8)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.7

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 1, 2023
…#152409)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Synthetics] adjust permissions for private locations
(#152037)](#152037)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Dominique
Clarke","email":"dominique.clarke@elastic.co"},"sourceCommit":{"committedDate":"2023-03-01T00:40:49Z","message":"[Synthetics]
adjust permissions for private locations (#152037)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/150725\r\n\r\nAdds
`Integrations: All` permissions requirement for interacting
with\r\nPrivate locations\r\n\r\nA user without permissions\r\n<img
width=\"1500\" alt=\"Screen Shot 2023-02-23 at 3 26 15
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023579-adc41aa9-2a57-4d97-89ef-048b757a3442.png\">\r\n<img
width=\"354\" alt=\"Screen Shot 2023-02-23 at 3 26 06
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023582-7025f9f7-068d-4d86-af2b-4699f51322d8.png\">\r\n<img
width=\"359\" alt=\"Screen Shot 2023-02-23 at 3 26 01
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023585-fb53b3fb-39e6-4340-b2dc-709168e66fc5.png\">\r\n<img
width=\"1510\" alt=\"Screen Shot 2023-02-23 at 2 36 02
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023588-582aa339-f14b-405c-86e8-8e22df5b9527.png\">\r\n<img
width=\"1521\" alt=\"Screen Shot 2023-02-23 at 1 16 38
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023590-2634a673-90a9-4e52-9725-4a2a50fa400e.png\">\r\n<img
width=\"1509\" alt=\"Screen Shot 2023-02-23 at 12 28 08
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023592-7acd7bcc-8dd7-40ba-a563-e84e0a0f1e92.png\">\r\n\r\nA
user with permissions\r\n<img width=\"1520\" alt=\"Screen Shot
2023-02-23 at 1 22 11
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023589-1cca1bf4-c9b5-4776-887d-73eb07b73862.png\">\r\n\r\n###
Testing\r\n\r\n1. Create a user with the following
permissions\r\n```\r\nIndex: synthetics-*: read\r\nKibana:
Uptime/Synthetics: All. Integrations: All\r\n```\r\n2. Log in as that
user\r\n3. Navigate to Private locations in Synthetics settings. Confirm
the add\r\nagent button is disabled and the need permission notice
appears\r\n4. Log in as a super user, create a private location\r\n5.
Log out, log in as the regular Uptime user\r\n6. Navigate to Private
locations in Synthetics settings. Confirm the\r\ncreate location button
is disabled and the need permission
notice\r\nappears\r\n\r\n---------\r\n\r\nCo-authored-by:
florent-leborgne
<florent.leborgne@elastic.co>","sha":"d86f2f8eb95f03b5fff44410a3371b169ec27e31","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","v8.7.0","v8.8.0"],"number":152037,"url":"https://github.com/elastic/kibana/pull/152037","mergeCommit":{"message":"[Synthetics]
adjust permissions for private locations (#152037)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/150725\r\n\r\nAdds
`Integrations: All` permissions requirement for interacting
with\r\nPrivate locations\r\n\r\nA user without permissions\r\n<img
width=\"1500\" alt=\"Screen Shot 2023-02-23 at 3 26 15
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023579-adc41aa9-2a57-4d97-89ef-048b757a3442.png\">\r\n<img
width=\"354\" alt=\"Screen Shot 2023-02-23 at 3 26 06
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023582-7025f9f7-068d-4d86-af2b-4699f51322d8.png\">\r\n<img
width=\"359\" alt=\"Screen Shot 2023-02-23 at 3 26 01
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023585-fb53b3fb-39e6-4340-b2dc-709168e66fc5.png\">\r\n<img
width=\"1510\" alt=\"Screen Shot 2023-02-23 at 2 36 02
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023588-582aa339-f14b-405c-86e8-8e22df5b9527.png\">\r\n<img
width=\"1521\" alt=\"Screen Shot 2023-02-23 at 1 16 38
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023590-2634a673-90a9-4e52-9725-4a2a50fa400e.png\">\r\n<img
width=\"1509\" alt=\"Screen Shot 2023-02-23 at 12 28 08
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023592-7acd7bcc-8dd7-40ba-a563-e84e0a0f1e92.png\">\r\n\r\nA
user with permissions\r\n<img width=\"1520\" alt=\"Screen Shot
2023-02-23 at 1 22 11
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023589-1cca1bf4-c9b5-4776-887d-73eb07b73862.png\">\r\n\r\n###
Testing\r\n\r\n1. Create a user with the following
permissions\r\n```\r\nIndex: synthetics-*: read\r\nKibana:
Uptime/Synthetics: All. Integrations: All\r\n```\r\n2. Log in as that
user\r\n3. Navigate to Private locations in Synthetics settings. Confirm
the add\r\nagent button is disabled and the need permission notice
appears\r\n4. Log in as a super user, create a private location\r\n5.
Log out, log in as the regular Uptime user\r\n6. Navigate to Private
locations in Synthetics settings. Confirm the\r\ncreate location button
is disabled and the need permission
notice\r\nappears\r\n\r\n---------\r\n\r\nCo-authored-by:
florent-leborgne
<florent.leborgne@elastic.co>","sha":"d86f2f8eb95f03b5fff44410a3371b169ec27e31"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152037","number":152037,"mergeCommit":{"message":"[Synthetics]
adjust permissions for private locations (#152037)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/150725\r\n\r\nAdds
`Integrations: All` permissions requirement for interacting
with\r\nPrivate locations\r\n\r\nA user without permissions\r\n<img
width=\"1500\" alt=\"Screen Shot 2023-02-23 at 3 26 15
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023579-adc41aa9-2a57-4d97-89ef-048b757a3442.png\">\r\n<img
width=\"354\" alt=\"Screen Shot 2023-02-23 at 3 26 06
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023582-7025f9f7-068d-4d86-af2b-4699f51322d8.png\">\r\n<img
width=\"359\" alt=\"Screen Shot 2023-02-23 at 3 26 01
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023585-fb53b3fb-39e6-4340-b2dc-709168e66fc5.png\">\r\n<img
width=\"1510\" alt=\"Screen Shot 2023-02-23 at 2 36 02
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023588-582aa339-f14b-405c-86e8-8e22df5b9527.png\">\r\n<img
width=\"1521\" alt=\"Screen Shot 2023-02-23 at 1 16 38
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023590-2634a673-90a9-4e52-9725-4a2a50fa400e.png\">\r\n<img
width=\"1509\" alt=\"Screen Shot 2023-02-23 at 12 28 08
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023592-7acd7bcc-8dd7-40ba-a563-e84e0a0f1e92.png\">\r\n\r\nA
user with permissions\r\n<img width=\"1520\" alt=\"Screen Shot
2023-02-23 at 1 22 11
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/221023589-1cca1bf4-c9b5-4776-887d-73eb07b73862.png\">\r\n\r\n###
Testing\r\n\r\n1. Create a user with the following
permissions\r\n```\r\nIndex: synthetics-*: read\r\nKibana:
Uptime/Synthetics: All. Integrations: All\r\n```\r\n2. Log in as that
user\r\n3. Navigate to Private locations in Synthetics settings. Confirm
the add\r\nagent button is disabled and the need permission notice
appears\r\n4. Log in as a super user, create a private location\r\n5.
Log out, log in as the regular Uptime user\r\n6. Navigate to Private
locations in Synthetics settings. Confirm the\r\ncreate location button
is disabled and the need permission
notice\r\nappears\r\n\r\n---------\r\n\r\nCo-authored-by:
florent-leborgne
<florent.leborgne@elastic.co>","sha":"d86f2f8eb95f03b5fff44410a3371b169ec27e31"}}]}]
BACKPORT-->

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
## Summary

Resolves elastic#150725

Adds `Integrations: All` permissions requirement for interacting with
Private locations

A user without permissions
<img width="1500" alt="Screen Shot 2023-02-23 at 3 26 15 PM"
src="https://user-images.githubusercontent.com/11356435/221023579-adc41aa9-2a57-4d97-89ef-048b757a3442.png">
<img width="354" alt="Screen Shot 2023-02-23 at 3 26 06 PM"
src="https://user-images.githubusercontent.com/11356435/221023582-7025f9f7-068d-4d86-af2b-4699f51322d8.png">
<img width="359" alt="Screen Shot 2023-02-23 at 3 26 01 PM"
src="https://user-images.githubusercontent.com/11356435/221023585-fb53b3fb-39e6-4340-b2dc-709168e66fc5.png">
<img width="1510" alt="Screen Shot 2023-02-23 at 2 36 02 PM"
src="https://user-images.githubusercontent.com/11356435/221023588-582aa339-f14b-405c-86e8-8e22df5b9527.png">
<img width="1521" alt="Screen Shot 2023-02-23 at 1 16 38 PM"
src="https://user-images.githubusercontent.com/11356435/221023590-2634a673-90a9-4e52-9725-4a2a50fa400e.png">
<img width="1509" alt="Screen Shot 2023-02-23 at 12 28 08 PM"
src="https://user-images.githubusercontent.com/11356435/221023592-7acd7bcc-8dd7-40ba-a563-e84e0a0f1e92.png">

A user with permissions
<img width="1520" alt="Screen Shot 2023-02-23 at 1 22 11 PM"
src="https://user-images.githubusercontent.com/11356435/221023589-1cca1bf4-c9b5-4776-887d-73eb07b73862.png">

### Testing

1. Create a user with the following permissions
```
Index: synthetics-*: read
Kibana: Uptime/Synthetics: All. Integrations: All
```
2. Log in as that user
3. Navigate to Private locations in Synthetics settings. Confirm the add
agent button is disabled and the need permission notice appears
4. Log in as a super user, create a private location
5. Log out, log in as the regular Uptime user
6. Navigate to Private locations in Synthetics settings. Confirm the
create location button is disabled and the need permission notice
appears

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.7.0 v8.8.0
Projects
None yet
6 participants