[BACKPORT] Types removal security index template (#39705) #39731
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As we are moving to single type indices,
we need to address this change in security-related indexes.
To address this, we are
_doc
_doc
Upgrade impact:-
In case of an upgrade from 6.x, the security index has type
doc
and this will keep working as there is a single type and_doc
works as an alias to an existing type. The change is handled in the
SecurityIndexManager
when we load mappings and settings fromthe template. Previously, we used to do a
PutIndexTemplateRequest
with the mapping source JSON with the type name. This has been
modified to remove the type name from the source.
So in the case of an upgrade, the
doc
type is updatedwhereas for fresh installs
_doc
is updated. This happens asbackend handles
_doc
as an alias to the existing type name.An optional step is to
reindex
security index and update thetype to
_doc
.Since we do not support the security audit log index,
that template has been deleted.
Relates: #38637