[BACKPORT] Types removal security index template (#39705)#39728
Merged
bizybot merged 1 commit intoelastic:7.xfrom Mar 6, 2019
Merged
[BACKPORT] Types removal security index template (#39705)#39728bizybot merged 1 commit intoelastic:7.xfrom
bizybot merged 1 commit intoelastic:7.xfrom
Conversation
As we are moving to single type indices, we need to address this change in security-related indexes. To address this, we are - updating index templates to use preferred type name `_doc` - updating the API calls to use preferred type name `_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 from the 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 updated whereas for fresh installs `_doc` is updated. This happens as backend handles `_doc` as an alias to the existing type name. An optional step is to `reindex` security index and update the type to `_doc`. Since we do not support the security audit log index, that template has been deleted. Relates: elastic#38637
Collaborator
|
Pinging @elastic/es-security |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_docUpgrade impact:-
In case of an upgrade from 6.x, the security index has type
docand this will keep working as there is a single type and_docworks as an alias to an existing type. The change is handled in the
SecurityIndexManagerwhen we load mappings and settings fromthe template. Previously, we used to do a
PutIndexTemplateRequestwith 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
doctype is updatedwhereas for fresh installs
_docis updated. This happens asbackend handles
_docas an alias to the existing type name.An optional step is to
reindexsecurity index and update thetype to
_doc.Since we do not support the security audit log index,
that template has been deleted.
Relates: #38637