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

Wildcard index templates can impact security index working #38678

Closed
bizybot opened this issue Feb 11, 2019 · 9 comments
Closed

Wildcard index templates can impact security index working #38678

bizybot opened this issue Feb 11, 2019 · 9 comments
Labels
>bug :Core/Infra/Core Core issues without another label needs:triage Requires assignment of a team area label :Security/Security Security issues without another label Team:Core/Infra Meta label for core/infra team Team:Security Meta label for security team

Comments

@bizybot
Copy link
Contributor

bizybot commented Feb 11, 2019

Elasticsearch allows the creation of index templates using wildcards which may be applicable to security index. We have seen this happening time to time and when that happens, the settings and mappings from these templates may override our security index template. The changes can be catastrophic, impacting the security of the system. It is difficult to debug when this happens.

This issue exists to discuss and find a solution:-

  • to identify when this happens via failure or warning message
  • to prevent this from happening

We may use the solution once available for the core issue related to index template inheritance (#21105), but that seems unlikely as ES security does not use the template for security index.

@bizybot bizybot added >bug :Security/Security Security issues without another label team-discuss labels Feb 11, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@jaymode
Copy link
Member

jaymode commented Feb 11, 2019

I really think these are the types of issues that drive the need for system indices as a concept within elasticsearch. I would love to see us put together a list of things that we’d like system indices to solve, this being one of them.

@bizybot
Copy link
Contributor Author

bizybot commented Feb 11, 2019

Yes, I think collecting all such requirements would be a good way to identify the need for system indices concept and what the expectations are. I will try to go through the issues/support tickets to identify common things and create a team discuss-issue for it.

@ppf2
Copy link
Member

ppf2 commented Feb 21, 2019

+1

ILM introduces another feature (via index templates) where users can inadvertently cause havoc on our system indices dot indices. @jakelandis

@droberts195
Copy link
Contributor

The problem of customer templates applying to internal indices has been previously raised in #29605. There was an idea for what to do in #29605 (comment).

It would be nice if the eventual solution could be used by all plugins that require internal indices, and not just security.

I think there are also two types of internal indices that we may wish to have slightly different restrictions on:

  1. Indices that need to be searchable externally, for example by the UI, but need to be protected from having customer index templates applied to them
  2. Indices storing highly sensitive data that need to be protected from having customer index templates applied to them and also protected from easy grants of read or write access to non super users

I guess security indices would fall into category 2, but ML has indices in both categories (and I think Watcher does too).

For indices in category 1 it would be nice for debugging purposes if wildcarded searches were still possible - see #29605 (comment).

@jasontedor jasontedor added the :Core/Infra/Core Core issues without another label label Feb 28, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jasontedor
Copy link
Member

@droberts195 The rough idea for system indices is that each plugin that manages a system index will also dictate the API that is available on top of that index (e.g., maybe some plugins expose search, and others do not). It would likely be via dedicated APIs though, not the general APIs.

@droberts195
Copy link
Contributor

It would likely be via dedicated APIs though, not the general APIs

I think for ML that means we'd keep some of our indices as standard indices and just make a subset into system indices (especially the ones that store security headers in configs).

/cc @davidkyle @hendrikmuhs

@rjernst rjernst added Team:Core/Infra Meta label for core/infra team Team:Security Meta label for security team labels May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@gwbrown
Copy link
Contributor

gwbrown commented Dec 15, 2020

This issue has been rolled into the effort to formalize and protect system indices (see #50251), and in particular is actively being addressed as part of #61656 to allow plugins to provide settings and mappings directly, rather than via index templates.

As this issue has been superseded by issues describing more concrete features and changes to address this issue, I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label needs:triage Requires assignment of a team area label :Security/Security Security issues without another label Team:Core/Infra Meta label for core/infra team Team:Security Meta label for security team
Projects
None yet
Development

No branches or pull requests

8 participants