Skip to content

Commit 258f7fe

Browse files
authored
update kibana_system to grant it access to .workflows-* system index (#134067)
1 parent c50ff19 commit 258f7fe

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,21 @@ public class KibanaPlugin extends Plugin implements SystemIndexPlugin {
6060
.setAllowedElasticProductOrigins(KIBANA_PRODUCT_ORIGIN)
6161
.build();
6262

63+
public static final SystemIndexDescriptor WORKFLOWS_INDEX_DESCRIPTOR = SystemIndexDescriptor.builder()
64+
.setIndexPattern(".workflows-*")
65+
.setDescription("Workflows system index")
66+
.setType(Type.EXTERNAL_UNMANAGED)
67+
.setAllowedElasticProductOrigins(KIBANA_PRODUCT_ORIGIN)
68+
.setAllowsTemplates()
69+
.build();
70+
6371
@Override
6472
public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings settings) {
6573
return List.of(
6674
KIBANA_INDEX_DESCRIPTOR,
6775
REPORTING_INDEX_DESCRIPTOR,
6876
ONECHAT_INDEX_DESCRIPTOR,
77+
WORKFLOWS_INDEX_DESCRIPTOR,
6978
APM_AGENT_CONFIG_INDEX_DESCRIPTOR,
7079
APM_CUSTOM_LINK_INDEX_DESCRIPTOR
7180
);

modules/kibana/src/test/java/org/elasticsearch/kibana/KibanaPluginTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class KibanaPluginTests extends ESTestCase {
2020
public void testKibanaIndexNames() {
2121
assertThat(
2222
new KibanaPlugin().getSystemIndexDescriptors(Settings.EMPTY).stream().map(SystemIndexDescriptor::getIndexPattern).toList(),
23-
contains(".kibana_*", ".reporting-*", ".chat-*", ".apm-agent-configuration*", ".apm-custom-link*")
23+
contains(".kibana_*", ".reporting-*", ".chat-*", ".workflows-*", ".apm-agent-configuration*", ".apm-custom-link*")
2424
);
2525
}
2626
}

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-*", ".chat-*")
112+
.indices(".kibana*", ".reporting-*", ".chat-*", ".workflows-*")
113113
.privileges("all")
114114
.allowRestrictedIndices(true)
115115
.build(),

0 commit comments

Comments
 (0)