Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only index into "doc" type in security index #42563

Merged
merged 1 commit into from
May 29, 2019

Conversation

tvernum
Copy link
Contributor

@tvernum tvernum commented May 27, 2019

The API Key Service would attempt to write to the "_doc"
(SINGLE_MAPPING_TYPE) type when indexing a new api key.
For indices created on 6.x, this works correctly, and indexes into the
"doc" type (the single type) that is used in security.

But if the security index was originally created on 5.x, this will
create a new "_doc" type in the index rather than adding the document
to the "doc" type.

Fixes: #42562

The API Key Service would attempt to write to the "_doc"
(SINGLE_MAPPING_TYPE) type when indexing a new api key.
For indices created on 6.x, this works correctly, and indexes into the
"doc" type (the single type) that is used in security.

But if the security index was originally created on 5.x, this will
create a new "_doc" type in the index rather than adding the document
to the "doc" type.

Fixes: elastic#42562
@tvernum tvernum added >bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.8.1 labels May 27, 2019
@tvernum tvernum requested review from bizybot and jkakavas May 27, 2019 05:26
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@tvernum
Copy link
Contributor Author

tvernum commented May 27, 2019

Note: This is a fix to the 6.8 branch only (because that is the only place it matters - 7.x/8.x only deal with a single document type).

Copy link
Member

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@bizybot bizybot left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants