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

[APM] Use subfeature permissions for Labs settings #197092

Merged

Conversation

rmyz
Copy link
Contributor

@rmyz rmyz commented Oct 21, 2024

Summary

Closes #197091

This PR uses the previously created (#194419) subfeature permissions for APM to be able to modify settings inside Labs flyout.

Screenshots for unauthorized user

Before After
image image

How to test

  1. Go under Stack Management -> Roles and create a new custom role.
  2. For Kibana, select All spaces for the space selector, and Customize, you can get all the permissions you need.
  3. Go into Observability and APM and User Experience.
  4. Select Read and save the role.
  5. Create a new user and assign that role and also the viewer role.
  6. Login with an incognito / different browser into the new user.
  7. Go into APM -> Settings, WARNING: if you are not able to see settings is because you don't have data, run node scripts/synthtrace many_services.ts --live --clean.
  8. You should not be able to change the configuration on each tab.
  9. Change the role privileges to have Read but with write access.
  10. Test it, you should be able to modify the settings.
  11. Do the same with All with and without the write permissions.

@rmyz rmyz self-assigned this Oct 21, 2024
@rmyz rmyz added release_note:fix backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) apm:settings ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Oct 21, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@rmyz
Copy link
Contributor Author

rmyz commented Oct 21, 2024

/ci

1 similar comment
@rmyz
Copy link
Contributor Author

rmyz commented Oct 21, 2024

/ci

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 21, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 483651d
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-197092-483651d8be30

Failed CI Steps

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
apm 3.4MB 3.4MB +293.0B

History

cc @rmyz

@rmyz rmyz marked this pull request as ready for review October 22, 2024 08:43
@rmyz rmyz requested a review from a team as a code owner October 22, 2024 08:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@rmyz rmyz merged commit 68b328d into elastic:main Oct 22, 2024
44 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11462670965

@rmyz rmyz deleted the 197091-apm-adapt-labs-to-use-subfeature-permissions branch October 22, 2024 14:45
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 22, 2024
## Summary

Closes elastic#197091

This PR uses the previously created
(elastic#194419) subfeature permissions
for APM to be able to modify settings inside Labs flyout.

## Screenshots for unauthorized user
| Before | After |

|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|

|![image](https://github.com/user-attachments/assets/a405c0c5-765d-4a18-a26a-55ba0df1d343)|![image](https://github.com/user-attachments/assets/a57e68c2-10c8-428b-9fce-31309b7a9d6e)|

## How to test
1. Go under Stack Management -> Roles and create a new custom role.
2. For Kibana, select All spaces for the space selector, and Customize,
you can get all the permissions you need.
3. Go into Observability and APM and User Experience.
4. Select Read and save the role.
5. Create a new user and assign that role and also the viewer role.
6. Login with an incognito / different browser into the new user.
7. Go into APM -> Settings, WARNING: if you are not able to see settings
is because you don't have data, run node scripts/synthtrace
many_services.ts --live --clean.
8. You should not be able to change the configuration on each tab.
9. Change the role privileges to have Read but with write access.
10. Test it, you should be able to modify the settings.
11. Do the same with All with and without the write permissions.

(cherry picked from commit 68b328d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Oct 22, 2024
…197259)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM] Use subfeature permissions for Labs settings
(#197092)](#197092)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T14:43:52Z","message":"[APM]
Use subfeature permissions for Labs settings (#197092)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197091\r\n\r\nThis PR uses the
previously created\r\n(#194419)
subfeature permissions\r\nfor APM to be able to modify settings inside
Labs flyout.\r\n\r\n## Screenshots for unauthorized user\r\n| Before |
After
|\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n\r\n|![image](https://github.com/user-attachments/assets/a405c0c5-765d-4a18-a26a-55ba0df1d343)|![image](https://github.com/user-attachments/assets/a57e68c2-10c8-428b-9fce-31309b7a9d6e)|\r\n\r\n##
How to test\r\n1. Go under Stack Management -> Roles and create a new
custom role.\r\n2. For Kibana, select All spaces for the space selector,
and Customize,\r\nyou can get all the permissions you need.\r\n3. Go
into Observability and APM and User Experience.\r\n4. Select Read and
save the role.\r\n5. Create a new user and assign that role and also the
viewer role.\r\n6. Login with an incognito / different browser into the
new user.\r\n7. Go into APM -> Settings, WARNING: if you are not able to
see settings\r\nis because you don't have data, run node
scripts/synthtrace\r\nmany_services.ts --live --clean.\r\n8. You should
not be able to change the configuration on each tab.\r\n9. Change the
role privileges to have Read but with write access.\r\n10. Test it, you
should be able to modify the settings.\r\n11. Do the same with All with
and without the write
permissions.","sha":"68b328d36ba6a178c27744c249b0cea7f4eaa00b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","apm:settings","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[APM]
Use subfeature permissions for Labs
settings","number":197092,"url":"https://github.com/elastic/kibana/pull/197092","mergeCommit":{"message":"[APM]
Use subfeature permissions for Labs settings (#197092)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197091\r\n\r\nThis PR uses the
previously created\r\n(#194419)
subfeature permissions\r\nfor APM to be able to modify settings inside
Labs flyout.\r\n\r\n## Screenshots for unauthorized user\r\n| Before |
After
|\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n\r\n|![image](https://github.com/user-attachments/assets/a405c0c5-765d-4a18-a26a-55ba0df1d343)|![image](https://github.com/user-attachments/assets/a57e68c2-10c8-428b-9fce-31309b7a9d6e)|\r\n\r\n##
How to test\r\n1. Go under Stack Management -> Roles and create a new
custom role.\r\n2. For Kibana, select All spaces for the space selector,
and Customize,\r\nyou can get all the permissions you need.\r\n3. Go
into Observability and APM and User Experience.\r\n4. Select Read and
save the role.\r\n5. Create a new user and assign that role and also the
viewer role.\r\n6. Login with an incognito / different browser into the
new user.\r\n7. Go into APM -> Settings, WARNING: if you are not able to
see settings\r\nis because you don't have data, run node
scripts/synthtrace\r\nmany_services.ts --live --clean.\r\n8. You should
not be able to change the configuration on each tab.\r\n9. Change the
role privileges to have Read but with write access.\r\n10. Test it, you
should be able to modify the settings.\r\n11. Do the same with All with
and without the write
permissions.","sha":"68b328d36ba6a178c27744c249b0cea7f4eaa00b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197092","number":197092,"mergeCommit":{"message":"[APM]
Use subfeature permissions for Labs settings (#197092)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/197091\r\n\r\nThis PR uses the
previously created\r\n(#194419)
subfeature permissions\r\nfor APM to be able to modify settings inside
Labs flyout.\r\n\r\n## Screenshots for unauthorized user\r\n| Before |
After
|\r\n\r\n|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\r\n\r\n|![image](https://github.com/user-attachments/assets/a405c0c5-765d-4a18-a26a-55ba0df1d343)|![image](https://github.com/user-attachments/assets/a57e68c2-10c8-428b-9fce-31309b7a9d6e)|\r\n\r\n##
How to test\r\n1. Go under Stack Management -> Roles and create a new
custom role.\r\n2. For Kibana, select All spaces for the space selector,
and Customize,\r\nyou can get all the permissions you need.\r\n3. Go
into Observability and APM and User Experience.\r\n4. Select Read and
save the role.\r\n5. Create a new user and assign that role and also the
viewer role.\r\n6. Login with an incognito / different browser into the
new user.\r\n7. Go into APM -> Settings, WARNING: if you are not able to
see settings\r\nis because you don't have data, run node
scripts/synthtrace\r\nmany_services.ts --live --clean.\r\n8. You should
not be able to change the configuration on each tab.\r\n9. Change the
role privileges to have Read but with write access.\r\n10. Test it, you
should be able to modify the settings.\r\n11. Do the same with All with
and without the write
permissions.","sha":"68b328d36ba6a178c27744c249b0cea7f4eaa00b"}}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:settings backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:fix Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Labs should be using subfeature permissions role to modify settings
4 participants