Skip to content

[SOR] Intersect allowed and authorized types#244967

Merged
afharo merged 16 commits intoelastic:mainfrom
afharo:saved-objects-repository/intersect-allowed-and-authorized-types
Dec 16, 2025
Merged

[SOR] Intersect allowed and authorized types#244967
afharo merged 16 commits intoelastic:mainfrom
afharo:saved-objects-repository/intersect-allowed-and-authorized-types

Conversation

@afharo
Copy link
Member

@afharo afharo commented Dec 2, 2025

Summary

We identified some scenarios where clients authorized to a partial list of SO types would circumvent the Saved Objects Repository's allowed types (it could list "hidden" SO types).

This PR addresses this issue by unifying the flow for partially and fully authorized clients, and applying the intersection of the allowed and authorized lists.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

  • Some APIs might have been abusing this bug. We need to validate through CI that they work as intended, and send an internal note to all Kibana contributors to raise awareness of potential failures.
@afharo afharo self-assigned this Dec 2, 2025
@afharo afharo added bug Fixes for quality problems that affect the customer experience Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:fix Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// backport:all-open Backport to all branches that could still receive a release labels Dec 2, 2025
@afharo afharo force-pushed the saved-objects-repository/intersect-allowed-and-authorized-types branch from 60c94ce to 3a28421 Compare December 3, 2025 14:17
}
if (authorizationResult?.status === 'partially_authorized') {
if (
authorizationResult?.status === 'fully_authorized' ||
Copy link
Member Author

@afharo afharo Dec 3, 2025

Choose a reason for hiding this comment

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

This only ensures the same path is followed for both authorization levels, although, functionally, it achieves the same result if we don't add this clause in the if.

Happy to remove this line if we think that performance might be a problem.

I'd appreciate @azasypkin's thoughts on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be more defensive to express this as if (authorizationResult?.status) {?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like @elastic/kibana-security's input to help me answer that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I might be missing some other context here, but if you are concerned with having the overhead of additional conditional checks, then this can just check that authorizationResult is not undefined or that authorizationResult.status is not unauthorized. Though, just before this we're returning if unauthorized. By this point in the execution path, the status must be either partially or fully authorized.

Copy link
Member Author

Choose a reason for hiding this comment

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

Apologies for not being clear: what I meant is that, in the current code, the fully_authorized doesn't go through this path, so typeToNamespacesMap is not defined, and only allowedTypes is used.

Maybe it's not worth spending CPU cycles to calculate the intersection of the authorized and the allowed types because the intersection will always equal allowedTypes.

I only added it because it made the code consistent before the fix. But happy to revert this change if we think that the extra CPU cycles are not necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see. Thanks for clarifying. You are correct, and I think it is fine to skip this logic for fully_authorized if there is any concern about performance here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a code comment for future us to know that's safe to be removed.

I left it for consistency, and because, while there are more CPU cycles used... I'd expect that, typically, users are partially_authorized, so we're just removing that branch for a low percentage of the users.

Comment on lines +180 to +181
// Discard the types that the SO repository doesn't know about (typically hidden objects).
if (!allowedTypes.includes(objType)) continue;
Copy link
Member Author

Choose a reason for hiding this comment

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

Mixing the user's authorization and the client's scope here (which can be odd).

However, typeToNamespacesMap doesn't really imply that it's bound to only one.

Copy link
Contributor

@jloleysens jloleysens Dec 5, 2025

Choose a reason for hiding this comment

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

Part of the issue/complexity for me is that we have types and typeToNamespacesMap and these can get out-of-sync. In that context, code like this looks a bit weird to me:

typeToNamespacesMap ? Array.from(typeToNamespacesMap.keys()) : type

Shouldn't our type: string | string[] | undefined be the source of truth for the types we are building queries for? Would another fix be to just use type as types when building our query (just on that line Iinked)? Or does that break something else?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC, this would break the authorization part: if we only look at the requested type, users who don't have access to the type will be able to read it. Also, in the line that you shared, type can be undefined, leading to getTypes to return all registered types (no matter if the user has access or not).

The bug here is that type is "cleaned up" from the hidden SOs that the SO Client isn't allowed to read, but we don't apply such filter to typeToNamespacesMap.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, thanks for taking a closer look @afharo ! We also have a comment talking directly to the issue I expressed:

      typeToNamespacesMap, // If defined, this takes precedence over the `type` and `namespaces` fields

Still a bit odd, but I think that's OK!

{
type: [
type,
'foo',
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add foo to the requested type so that it is kept in the auth map.

expect(arrayMapsAreEqual(actualMap, expectedMap)).toBeTruthy();
});

test(`uses the authorization map when fully authorized`, async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

just repeating the test above, but for fully authorized.

Comment on lines 119 to 120
// Make sure to search through all the hidden types as well.
includedHiddenTypes: types.filter((t) => t.hidden).map((t) => t.name),
Copy link
Member Author

Choose a reason for hiding this comment

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

I assume that we want to search references to the Data View across all types. Is my assumption correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, tested locally and this fixes the bug from #243432, thanks!

And your assumption is correct, although we're intending to get approval from existing hidden SO owners before changing the swap_references API to make sure everyone is on the same page. I've pinged all owning teams now and am tracking an approvals list in #243432.

I'm hoping to get all approvals quickly, but if you'd like to get this PR merged ahead of that, please feel free to drop these changes for now and we can reintroduce them in a separate PR after, as well as adding some integration tests for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, @davismcphee.

We agreed in the Core team that we'll send a heads-up to all other teams and hold off on merging until next week to give enough time to test and react. So happy to wait for your approval.

Copy link
Member Author

Choose a reason for hiding this comment

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

As agreed, I reverted the changes here

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the heads up @afharo, I think this makes sense. Looks like the swap_references case is a bit more complicated than anticipated, and we'll have some additional work to do there.

@afharo afharo marked this pull request as ready for review December 4, 2025 00:08
@afharo afharo requested review from a team as code owners December 4, 2025 00:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@afharo afharo requested a review from a team December 4, 2025 00:09
@afharo afharo added the Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// label Dec 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@afharo afharo added ci:cloud-deploy Create or update a Cloud deployment ci:cloud-persist-deployment Persist cloud deployment indefinitely ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project ci:project-deploy-observability Create an Observability project ci:project-deploy-security Create a Security Serverless Project ci:project-persist-deployment Persist project deployment indefinitely ci:cloud-deploy-elser If set, the ML node in the ES cluster will be deployed with considerations towards the ELSER model ci:cloud-fips-deploy ci:project-deploy-ai4soc Create an AI for SOC Security Serverless Project labels Dec 5, 2025
@afharo afharo removed ci:project-persist-deployment Persist project deployment indefinitely ci:cloud-deploy-elser If set, the ML node in the ES cluster will be deployed with considerations towards the ELSER model ci:cloud-fips-deploy ci:project-deploy-ai4soc Create an AI for SOC Security Serverless Project ci:project-deploy-log_essentials Create an Observability project in the Log Essentials tier ci:project-deploy-workplace_ai Create a Workplace AI project labels Dec 16, 2025
@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #8 / serverless observability UI - Cases and Rules Serverless Observability Cases Cases list row actions Severity to critical

History

cc @afharo

@afharo afharo merged commit 28fc5b9 into elastic:main Dec 16, 2025
14 checks passed
@afharo afharo deleted the saved-objects-repository/intersect-allowed-and-authorized-types branch December 16, 2025 18:59
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2025
## Summary

We identified some scenarios where clients authorized to a partial list
of SO types would circumvent the Saved Objects Repository's allowed
types (it could list "hidden" SO types).

This PR addresses this issue by unifying the flow for partially and
fully authorized clients, and applying the intersection of the allowed
and authorized lists.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- [x] Some APIs might have been abusing this bug. We need to validate
through CI that they work as intended, and send an internal note to all
Kibana contributors to raise awareness of potential failures.

---------

Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
(cherry picked from commit 28fc5b9)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2025
## Summary

We identified some scenarios where clients authorized to a partial list
of SO types would circumvent the Saved Objects Repository's allowed
types (it could list "hidden" SO types).

This PR addresses this issue by unifying the flow for partially and
fully authorized clients, and applying the intersection of the allowed
and authorized lists.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- [x] Some APIs might have been abusing this bug. We need to validate
through CI that they work as intended, and send an internal note to all
Kibana contributors to raise awareness of potential failures.

---------

Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
(cherry picked from commit 28fc5b9)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 16, 2025
## Summary

We identified some scenarios where clients authorized to a partial list
of SO types would circumvent the Saved Objects Repository's allowed
types (it could list "hidden" SO types).

This PR addresses this issue by unifying the flow for partially and
fully authorized clients, and applying the intersection of the allowed
and authorized lists.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

- [x] Some APIs might have been abusing this bug. We need to validate
through CI that they work as intended, and send an internal note to all
Kibana contributors to raise awareness of potential failures.

---------

Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
(cherry picked from commit 28fc5b9)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1
9.2

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 Dec 16, 2025
# Backport

This will backport the following commits from `main` to `9.2`:
- [[SOR] Intersect allowed and authorized types
(#244967)](#244967)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2025-12-16T18:59:35Z","message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:fix","Team:Security","Team:DataDiscovery","backport:all-open","v9.3.0"],"title":"[SOR]
Intersect allowed and authorized
types","number":244967,"url":"https://github.com/elastic/kibana/pull/244967","mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244967","number":244967,"mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
kibanamachine added a commit that referenced this pull request Dec 16, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[SOR] Intersect allowed and authorized types
(#244967)](#244967)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2025-12-16T18:59:35Z","message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:fix","Team:Security","Team:DataDiscovery","backport:all-open","v9.3.0"],"title":"[SOR]
Intersect allowed and authorized
types","number":244967,"url":"https://github.com/elastic/kibana/pull/244967","mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244967","number":244967,"mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
kibanamachine added a commit that referenced this pull request Dec 17, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[SOR] Intersect allowed and authorized types
(#244967)](#244967)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2025-12-16T18:59:35Z","message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","release_note:fix","Team:Security","Team:DataDiscovery","backport:all-open","v9.3.0"],"title":"[SOR]
Intersect allowed and authorized
types","number":244967,"url":"https://github.com/elastic/kibana/pull/244967","mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244967","number":244967,"mergeCommit":{"message":"[SOR]
Intersect allowed and authorized types (#244967)\n\n## Summary\n\nWe
identified some scenarios where clients authorized to a partial list\nof
SO types would circumvent the Saved Objects Repository's allowed\ntypes
(it could list \"hidden\" SO types).\n\nThis PR addresses this issue by
unifying the flow for partially and\nfully authorized clients, and
applying the intersection of the allowed\nand authorized lists.\n\n\n###
Checklist\n\n- [x] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [x] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\n- [x]
Some APIs might have been abusing this bug. We need to validate\nthrough
CI that they work as intended, and send an internal note to all\nKibana
contributors to raise awareness of potential
failures.\n\n---------\n\nCo-authored-by: Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"28fc5b935532b01a810acfefbeaf2b7ce8dba82c"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release bug Fixes for quality problems that affect the customer experience release_note:fix Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// v8.19.9 v9.1.10 v9.2.4 v9.3.0

7 participants