Skip to content

Validate V2 templates more strictly#56170

Merged
dakrone merged 4 commits intoelastic:masterfrom
dakrone:itv2-enhance-template-validation
May 5, 2020
Merged

Validate V2 templates more strictly#56170
dakrone merged 4 commits intoelastic:masterfrom
dakrone:itv2-enhance-template-validation

Conversation

@dakrone
Copy link
Copy Markdown
Member

@dakrone dakrone commented May 4, 2020

This commit changes the validation for V2 index and component templates to re-use the same
validation that V1 templates used. This includes things like invalid template names, index patterns,
etc.

This also adds validation that template names do not contain * and index patterns do not contain
: (index names can't contain this regardless).

Supercedes #53970
Relates to #53101
Resolves #43737
Resolves #46045

This commit changes the validation for V2 index and component templates to re-use the same
validation that V1 templates used. This includes things like invalid template names, index patterns,
etc.

This also adds validation that template names do not contain `*`.

Supercedes elastic#53970
Relates to elastic#53101
@dakrone dakrone added :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.8.0 labels May 4, 2020
@dakrone dakrone requested review from andreidan and probakowski May 4, 2020 23:10
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label May 4, 2020
@martijnvg martijnvg mentioned this pull request May 4, 2020
39 tasks
Copy link
Copy Markdown
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this Lee

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented May 5, 2020

@elasticmachine update branch

@dakrone dakrone merged commit ed271a6 into elastic:master May 5, 2020
@dakrone dakrone deleted the itv2-enhance-template-validation branch May 5, 2020 15:24
dakrone added a commit to dakrone/elasticsearch that referenced this pull request May 5, 2020
This commit changes the validation for V2 index and component templates to re-use the same
validation that V1 templates used. This includes things like invalid template names, index patterns,
etc.

This also adds validation that template names do not contain `*` and index patterns do not contain
`:` (index names can't contain this regardless).

Supercedes elastic#53970
Relates to elastic#53101
Resolves elastic#43737
Resolves elastic#46045
dakrone added a commit that referenced this pull request May 5, 2020
Backports the following commits to 7.x:
 - Validate V2 templates more strictly (#56170)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow creating index templates with : in pattern Template can be created with wildcard * in the name

7 participants