Skip to content

Commit 0357ac8

Browse files
committed
update kibana_system to grant it access to .chat-* system index
1 parent adcb2a5 commit 0357ac8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/kibana/src/main/java/org/elasticsearch/kibana/KibanaPlugin.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ public class KibanaPlugin extends Plugin implements SystemIndexPlugin {
3838
.setAllowedElasticProductOrigins(KIBANA_PRODUCT_ORIGIN)
3939
.build();
4040

41+
public static final SystemIndexDescriptor ONECHAT_INDEX_DESCRIPTOR = SystemIndexDescriptor.builder()
42+
.setIndexPattern(".chat-*")
43+
.setDescription("Onechat system index")
44+
.setType(Type.EXTERNAL_UNMANAGED)
45+
.setAllowedElasticProductOrigins(KIBANA_PRODUCT_ORIGIN)
46+
.build();
47+
4148
public static final SystemIndexDescriptor APM_AGENT_CONFIG_INDEX_DESCRIPTOR = SystemIndexDescriptor.builder()
4249
.setIndexPattern(".apm-agent-configuration*")
4350
.setDescription("system index for APM agent configuration")
@@ -57,6 +64,7 @@ public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings sett
5764
return List.of(
5865
KIBANA_INDEX_DESCRIPTOR,
5966
REPORTING_INDEX_DESCRIPTOR,
67+
ONECHAT_INDEX_DESCRIPTOR,
6068
APM_AGENT_CONFIG_INDEX_DESCRIPTOR,
6169
APM_CUSTOM_LINK_INDEX_DESCRIPTOR
6270
);

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static RoleDescriptor kibanaSystem(String name) {
109109
new RoleDescriptor.IndicesPrivileges[] {
110110
// System indices defined in KibanaPlugin
111111
RoleDescriptor.IndicesPrivileges.builder()
112-
.indices(".kibana*", ".reporting-*")
112+
.indices(".kibana*", ".reporting-*", ".chat-*")
113113
.privileges("all")
114114
.allowRestrictedIndices(true)
115115
.build(),

0 commit comments

Comments
 (0)