mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
This commit adds a module emitting a deprecation warning when a dot-prefixed index is manually or automatically created, or when a composable index template with an index pattern that uses a dot-prefix is created. This pattern warns that in the future these indices will not be allowed. In a future breaking change (10.0.0 maybe?) the deprecation can then be changed to an exception. These deprecations are only displayed when a non-operator user is using the API (one that does not set the `X-elastic-product-origin` header).
25 lines
864 B
Groovy
25 lines
864 B
Groovy
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
|
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
|
apply plugin: 'elasticsearch.internal-cluster-test'
|
|
|
|
esplugin {
|
|
description 'Validation for dot-prefixed indices for non-operator users'
|
|
classname 'org.elasticsearch.validation.DotPrefixValidationPlugin'
|
|
}
|
|
|
|
restResources {
|
|
restApi {
|
|
include '_common', 'indices', 'index', 'cluster', 'nodes', 'get', 'ingest', 'bulk', 'reindex'
|
|
}
|
|
}
|
|
|
|
tasks.named('yamlRestTest') {
|
|
usesDefaultDistribution()
|
|
}
|