[Fields Metadata] Restrict access to integration fields by privileges#199774
Merged
tonyghiani merged 6 commits intoelastic:mainfrom Nov 19, 2024
Merged
[Fields Metadata] Restrict access to integration fields by privileges#199774tonyghiani merged 6 commits intoelastic:mainfrom
tonyghiani merged 6 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
Contributor
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
History
|
Contributor
|
Starting backport for target branches: 8.x |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 19, 2024
…elastic#199774) ## 📓 Summary Related to elastic#198349 Disabling authorization on fields metadata `find API` implies every user would have access to the integration fields since we use the internal user to retrieve the package information. On the other hand, requiring API root-level privileges for `fleet` and `fleetv2` would restrict more use cases since other apps might rely on this service to consume field metadata from ECS only, with no need for integration permissions (Discover, etc.). To keep the door open to all these use cases, we'll check the available user privileges on a per-request basis and allow integration fields only when they have access to fleet and integrations, without fully restricting the service. https://github.com/user-attachments/assets/49b9953a-f1e1-410a-8c7f-c38d87408fcc --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> (cherry picked from commit 45056f3)
Contributor
💚 All backports created successfully
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
Nov 19, 2024
…ileges (#199774) (#200676) # Backport This will backport the following commits from `main` to `8.x`: - [[Fields Metadata] Restrict access to integration fields by privileges (#199774)](#199774) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Antonio Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2024-11-19T08:00:22Z","message":"[Fields Metadata] Restrict access to integration fields by privileges (#199774)\n\n## 📓 Summary\r\n\r\nRelated to #198349 \r\n\r\nDisabling authorization on fields metadata `find API` implies every user\r\nwould have access to the integration fields since we use the internal\r\nuser to retrieve the package information.\r\n\r\nOn the other hand, requiring API root-level privileges for `fleet` and\r\n`fleetv2` would restrict more use cases since other apps might rely on\r\nthis service to consume field metadata from ECS only, with no need for\r\nintegration permissions (Discover, etc.).\r\n\r\nTo keep the door open to all these use cases, we'll check the available\r\nuser privileges on a per-request basis and allow integration fields only\r\nwhen they have access to fleet and integrations, without fully\r\nrestricting the service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/49b9953a-f1e1-410a-8c7f-c38d87408fcc\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"45056f3abb268048e27ac297e4f9238ac86dba69","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-logs"],"title":"[Fields Metadata] Restrict access to integration fields by privileges","number":199774,"url":"https://github.com/elastic/kibana/pull/199774","mergeCommit":{"message":"[Fields Metadata] Restrict access to integration fields by privileges (#199774)\n\n## 📓 Summary\r\n\r\nRelated to #198349 \r\n\r\nDisabling authorization on fields metadata `find API` implies every user\r\nwould have access to the integration fields since we use the internal\r\nuser to retrieve the package information.\r\n\r\nOn the other hand, requiring API root-level privileges for `fleet` and\r\n`fleetv2` would restrict more use cases since other apps might rely on\r\nthis service to consume field metadata from ECS only, with no need for\r\nintegration permissions (Discover, etc.).\r\n\r\nTo keep the door open to all these use cases, we'll check the available\r\nuser privileges on a per-request basis and allow integration fields only\r\nwhen they have access to fleet and integrations, without fully\r\nrestricting the service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/49b9953a-f1e1-410a-8c7f-c38d87408fcc\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"45056f3abb268048e27ac297e4f9238ac86dba69"}},"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/199774","number":199774,"mergeCommit":{"message":"[Fields Metadata] Restrict access to integration fields by privileges (#199774)\n\n## 📓 Summary\r\n\r\nRelated to #198349 \r\n\r\nDisabling authorization on fields metadata `find API` implies every user\r\nwould have access to the integration fields since we use the internal\r\nuser to retrieve the package information.\r\n\r\nOn the other hand, requiring API root-level privileges for `fleet` and\r\n`fleetv2` would restrict more use cases since other apps might rely on\r\nthis service to consume field metadata from ECS only, with no need for\r\nintegration permissions (Discover, etc.).\r\n\r\nTo keep the door open to all these use cases, we'll check the available\r\nuser privileges on a per-request basis and allow integration fields only\r\nwhen they have access to fleet and integrations, without fully\r\nrestricting the service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/49b9953a-f1e1-410a-8c7f-c38d87408fcc\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>","sha":"45056f3abb268048e27ac297e4f9238ac86dba69"}}]}] BACKPORT--> Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Dec 12, 2024
…elastic#199774) ## 📓 Summary Related to elastic#198349 Disabling authorization on fields metadata `find API` implies every user would have access to the integration fields since we use the internal user to retrieve the package information. On the other hand, requiring API root-level privileges for `fleet` and `fleetv2` would restrict more use cases since other apps might rely on this service to consume field metadata from ECS only, with no need for integration permissions (Discover, etc.). To keep the door open to all these use cases, we'll check the available user privileges on a per-request basis and allow integration fields only when they have access to fleet and integrations, without fully restricting the service. https://github.com/user-attachments/assets/49b9953a-f1e1-410a-8c7f-c38d87408fcc --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📓 Summary
Related to #198349
Disabling authorization on fields metadata
find APIimplies every user would have access to the integration fields since we use the internal user to retrieve the package information.On the other hand, requiring API root-level privileges for
fleetandfleetv2would restrict more use cases since other apps might rely on this service to consume field metadata from ECS only, with no need for integration permissions (Discover, etc.).To keep the door open to all these use cases, we'll check the available user privileges on a per-request basis and allow integration fields only when they have access to fleet and integrations, without fully restricting the service.
Screen.Recording.2024-11-12.at.12.38.05.mov