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

[Logs Explorer] Fix Privileges Accessibility #193894

Conversation

mohamedhamed-ahmed
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed commented Sep 24, 2024

closes #192062

📝 Summary

This PR adds privileges checks for Logs Explorerer it checks for Discover & Fleet privileges before allowing the user access to Logs Explorer.
Clicking on the Logs tab from the side nav defaults to Stream, as long as its not depricated, in case the user doesn't have access to Logs Explorer

🎥 Demo

Demo.mov

@mohamedhamed-ahmed mohamedhamed-ahmed added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team labels Sep 24, 2024
@obltmachine
Copy link

🤖 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!)

@mohamedhamed-ahmed mohamedhamed-ahmed marked this pull request as ready for review October 1, 2024 09:48
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 1, 2024
@mohamedhamed-ahmed mohamedhamed-ahmed added v8.15.0 v8.16.0 backport:version Backport to applied version labels Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Oct 1, 2024
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 1, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: d781637
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-193894-d781637434c4

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
infra 1.6MB 1.6MB +99.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 52.4KB 52.5KB +81.0B
observabilityLogsExplorer 14.4KB 14.7KB +294.0B
total +375.0B

History

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

@mohamedhamed-ahmed mohamedhamed-ahmed merged commit dbfd4f0 into elastic:main Oct 1, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 1, 2024
closes elastic#192062

## 📝  Summary

This PR adds privileges checks for `Logs Explorerer` it checks for
`Discover & Fleet` privileges before allowing the user access to `Logs
Explorer`.
Clicking on the `Logs` tab from the side nav defaults to `Stream`, as
long as its not depricated, in case the user doesn't have access to
`Logs Explorer`

## 🎥 Demo

https://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf
(cherry picked from commit dbfd4f0)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 193894

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 1, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Logs Explorer] Fix Privileges Accessibility
(#193894)](#193894)

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

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

<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2024-10-01T11:38:16Z","message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","v8.15.0","v8.16.0","backport:version"],"title":"[Logs
Explorer] Fix Privileges
Accessibility","number":193894,"url":"https://github.com/elastic/kibana/pull/193894","mergeCommit":{"message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7"}},"sourceBranch":"main","suggestedTargetBranches":["8.15","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193894","number":193894,"mergeCommit":{"message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7"}},{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: mohamedhamed-ahmed <mohamed.ahmed@elastic.co>
@mohamedhamed-ahmed
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.15

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

Questions ?

Please refer to the Backport tool documentation

mohamedhamed-ahmed added a commit to mohamedhamed-ahmed/kibana that referenced this pull request Oct 1, 2024
closes elastic#192062

## 📝  Summary

This PR adds privileges checks for `Logs Explorerer` it checks for
`Discover & Fleet` privileges before allowing the user access to `Logs
Explorer`.
Clicking on the `Logs` tab from the side nav defaults to `Stream`, as
long as its not depricated, in case the user doesn't have access to
`Logs Explorer`

## 🎥 Demo

https://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf
(cherry picked from commit dbfd4f0)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/public/apps/logs_app.tsx
mohamedhamed-ahmed added a commit that referenced this pull request Oct 2, 2024
# Backport

This will backport the following commits from `main` to `8.15`:
- [[Logs Explorer] Fix Privileges Accessibility
(#193894)](#193894)

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

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

<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2024-10-01T11:38:16Z","message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","apm:review","v8.15.0","v8.16.0","backport:version"],"number":193894,"url":"https://github.com/elastic/kibana/pull/193894","mergeCommit":{"message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193894","number":193894,"mergeCommit":{"message":"[Logs
Explorer] Fix Privileges Accessibility (#193894)\n\ncloses
https://github.com/elastic/kibana/issues/192062\r\n\r\n## 📝
Summary\r\n\r\nThis PR adds privileges checks for `Logs Explorerer` it
checks for\r\n`Discover & Fleet` privileges before allowing the user
access to `Logs\r\nExplorer`.\r\nClicking on the `Logs` tab from the
side nav defaults to `Stream`, as\r\nlong as its not depricated, in case
the user doesn't have access to\r\n`Logs Explorer`\r\n\r\n## 🎥
Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf","sha":"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7"}},{"branch":"8.15","label":"v8.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/194557","number":194557,"state":"MERGED","mergeCommit":{"sha":"ee920811f6c17f6ea264cc5e3527e63cd2c0fd46","message":"[8.x]
[Logs Explorer] Fix Privileges Accessibility (#193894) (#194557)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.x`:\n- [[Logs Explorer] Fix Privileges
Accessibility\n(#193894)](https://github.com/elastic/kibana/pull/193894)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT\n[{\"author\":{\"name\":\"mohamedhamed-ahmed\",\"email\":\"mohamed.ahmed@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2024-10-01T11:38:16Z\",\"message\":\"[Logs\nExplorer]
Fix Privileges Accessibility
(#193894)\\n\\ncloses\nhttps://github.com//issues/192062\\r\\n\\r\\n##
📝\nSummary\\r\\n\\r\\nThis PR adds privileges checks for `Logs
Explorerer` it\nchecks for\\r\\n`Discover & Fleet` privileges before
allowing the user\naccess to `Logs\\r\\nExplorer`.\\r\\nClicking on the
`Logs` tab from the\nside nav defaults to `Stream`, as\\r\\nlong as its
not depricated, in case\nthe user doesn't have access to\\r\\n`Logs
Explorer`\\r\\n\\r\\n##
🎥\nDemo\\r\\n\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf\",\"sha\":\"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.16.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"ci:project-deploy-observability\",\"Team:obs-ux-logs\",\"Team:obs-ux-infra_services\",\"v8.15.0\",\"v8.16.0\",\"backport:version\"],\"title\":\"[Logs\nExplorer]
Fix
Privileges\nAccessibility\",\"number\":193894,\"url\":\"https://github.com/elastic/kibana/pull/193894\",\"mergeCommit\":{\"message\":\"[Logs\nExplorer]
Fix Privileges Accessibility
(#193894)\\n\\ncloses\nhttps://github.com//issues/192062\\r\\n\\r\\n##
📝\nSummary\\r\\n\\r\\nThis PR adds privileges checks for `Logs
Explorerer` it\nchecks for\\r\\n`Discover & Fleet` privileges before
allowing the user\naccess to `Logs\\r\\nExplorer`.\\r\\nClicking on the
`Logs` tab from the\nside nav defaults to `Stream`, as\\r\\nlong as its
not depricated, in case\nthe user doesn't have access to\\r\\n`Logs
Explorer`\\r\\n\\r\\n##
🎥\nDemo\\r\\n\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf\",\"sha\":\"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.15\",\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/193894\",\"number\":193894,\"mergeCommit\":{\"message\":\"[Logs\nExplorer]
Fix Privileges Accessibility
(#193894)\\n\\ncloses\nhttps://github.com//issues/192062\\r\\n\\r\\n##
📝\nSummary\\r\\n\\r\\nThis PR adds privileges checks for `Logs
Explorerer` it\nchecks for\\r\\n`Discover & Fleet` privileges before
allowing the user\naccess to `Logs\\r\\nExplorer`.\\r\\nClicking on the
`Logs` tab from the\nside nav defaults to `Stream`, as\\r\\nlong as its
not depricated, in case\nthe user doesn't have access to\\r\\n`Logs
Explorer`\\r\\n\\r\\n##
🎥\nDemo\\r\\n\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf\",\"sha\":\"dbfd4f0879aa89c49b379cc2c6c5feb74f5c16c7\"}},{\"branch\":\"8.15\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.x\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v8.16.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
mohamedhamed-ahmed <mohamed.ahmed@elastic.co>"}}]}] BACKPORT-->
mohamedhamed-ahmed added a commit to mohamedhamed-ahmed/kibana that referenced this pull request Oct 30, 2024
closes elastic#192062

This PR adds privileges checks for `Logs Explorerer` it checks for
`Discover & Fleet` privileges before allowing the user access to `Logs
Explorer`.
Clicking on the `Logs` tab from the side nav defaults to `Stream`, as
long as its not depricated, in case the user doesn't have access to
`Logs Explorer`

https://github.com/user-attachments/assets/a4105ec0-7681-40ee-b2fd-e39b9c178dcf
(cherry picked from commit dbfd4f0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-logs Observability Logs User Experience Team v8.15.0 v8.15.3 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Observability Log Explorer accessible with Kibana dashboard only role
8 participants