Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2b0f455
added privilege and test
Supplementing Aug 6, 2025
084ba05
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 6, 2025
774c20b
[CI] Auto commit changes from spotless
Aug 6, 2025
5e65044
changed privileges
Supplementing Aug 6, 2025
71503b9
fixed conflicts
Supplementing Aug 6, 2025
b152bc9
removed conflict i missed
Supplementing Aug 6, 2025
2b42f64
[CI] Auto commit changes from spotless
Aug 6, 2025
d2ba854
updated test
Supplementing Aug 7, 2025
130955e
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 7, 2025
67014a9
rolled back test to be correct to investigate failure
Supplementing Aug 7, 2025
e054b35
added additional indexAbstraction function with actual type to avoid …
Supplementing Aug 8, 2025
fca466f
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 8, 2025
1a6871d
changed test to true for now due to BWC logic
Supplementing Aug 8, 2025
189b85c
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 8, 2025
e0ea28f
[CI] Auto commit changes from spotless
Aug 8, 2025
7ac998d
changed to let index management be the responsibility of ES
Supplementing Aug 12, 2025
d0bd00f
merged in main
Supplementing Aug 12, 2025
fa552d1
Removed unneeded function
Supplementing Aug 12, 2025
1f87382
[CI] Auto commit changes from spotless
Aug 12, 2025
d5f0fd8
fixed formatting of variable in json
Supplementing Aug 12, 2025
e009458
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 12, 2025
da9eec1
Update x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/…
Supplementing Aug 12, 2025
b2ba08c
Update x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/…
Supplementing Aug 12, 2025
89e6ac6
added changelog and removed whitespace
Supplementing Aug 12, 2025
1c9a8ee
actually remove whitespace
Supplementing Aug 12, 2025
2683a61
[CI] Auto commit changes from spotless
Aug 12, 2025
a725405
changed area in changelog
Supplementing Aug 12, 2025
ea54a32
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 12, 2025
e388291
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 12, 2025
356c20c
fixed indicies IT to use correct url
Supplementing Aug 12, 2025
ad566f3
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 12, 2025
9453716
fixed mapping issues by updating plugins needed to use types, also fi…
Supplementing Aug 15, 2025
7526470
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 15, 2025
1a3d494
changed index to externally mananged, and removed permissive warnings
Supplementing Aug 15, 2025
140675e
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 15, 2025
72c11d3
[CI] Auto commit changes from spotless
Aug 15, 2025
a18980e
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 18, 2025
8a4f572
made changes to support semantic search with the .md content being ad…
Supplementing Aug 18, 2025
1c1c958
Merge branch 'knowledge-base-index-privileges' of https://github.com/…
Supplementing Aug 18, 2025
9ed402c
Merge branch 'main' into knowledge-base-index-privileges
Supplementing Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ static RoleDescriptor kibanaSystem(String name) {
.privileges("write", "delete", "create_index")
.allowRestrictedIndices(true)
.build(),
// Knowledge base. Fleet creates, manages, and uses this index to store knowledge base documents to be consumed by AI
// assistants.
RoleDescriptor.IndicesPrivileges.builder()
.indices(".integration_knowledge*")
.privileges("read", "write", "create_index")
.build(),
// Other Fleet indices. Kibana reads and writes to these indices to manage
// Elastic Agents.
RoleDescriptor.IndicesPrivileges.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,31 @@ public void testKibanaSystemRole() {
".fleet-fileds"
).forEach(index -> assertAllIndicesAccessAllowed(kibanaRole, index));

// Knowledge base. Fleet creates, manages, and uses this index to store knowledge base documents to be consumed by AI assistants.
Arrays.asList(".integration_knowledge" + randomAlphaOfLength(randomIntBetween(0, 13))).forEach((index) -> {
final IndexAbstraction indexAbstraction = mockIndexAbstraction(index);
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(indexAbstraction), is(false));
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:bar").test(indexAbstraction), is(false));
assertThat(
kibanaRole.indices().allowedIndicesMatcher(TransportDeleteIndexAction.TYPE.name()).test(indexAbstraction),
is(false)
);
assertThat(kibanaRole.indices().allowedIndicesMatcher(GetIndexAction.NAME).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportCreateIndexAction.TYPE.name()).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportIndexAction.NAME).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportDeleteAction.NAME).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportSearchAction.TYPE.name()).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportMultiSearchAction.TYPE.name()).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportGetAction.TYPE.name()).test(indexAbstraction), is(true));
assertThat(kibanaRole.indices().allowedIndicesMatcher(READ_CROSS_CLUSTER_NAME).test(indexAbstraction), is(false));
assertThat(
kibanaRole.indices().allowedIndicesMatcher(TransportUpdateSettingsAction.TYPE.name()).test(indexAbstraction),
is(false)
);
assertThat(kibanaRole.indices().allowedIndicesMatcher(TransportPutMappingAction.TYPE.name()).test(indexAbstraction), is(false));
assertThat(kibanaRole.indices().allowedIndicesMatcher(RolloverAction.NAME).test(indexAbstraction), is(false));
});

final IndexAbstraction dotFleetSecretsIndex = mockIndexAbstraction(".fleet-secrets");
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(dotFleetSecretsIndex), is(false));
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:bar").test(dotFleetSecretsIndex), is(false));
Expand Down