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

Replace SecurityIndexManager with special client #36078

Open
jaymode opened this issue Nov 29, 2018 · 4 comments
Open

Replace SecurityIndexManager with special client #36078

jaymode opened this issue Nov 29, 2018 · 4 comments
Labels
>refactoring :Security/Security Security issues without another label Team:Security Meta label for security team

Comments

@jaymode
Copy link
Member

jaymode commented Nov 29, 2018

Currently, we use the SecurityIndexManager throughout our code to be "smart" and preempt certain conditions based on the last observed cluster state when interacting with the security index. However these conditions that we try to preempt can still occur so we still need to handle them within each individual response listener. The SecurityIndexManager is also responsible for ensuring that the index has the correct mappings and has been upgraded to the latest version.

In order to simplify our code, it has been suggested that we replace this with a specialized client that knows how to handle the error conditions and that we do not preempt failures. One item that would be a prerequisite would be to disallow the auto creation of the security index by a index request, see #34737.

@jaymode jaymode added >refactoring :Security/Security Security issues without another label labels Nov 29, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@albertzaharovits
Copy link
Contributor

We've uncovered another problem of this. The callers that race to create the index (prepareIndexIfNeededThenExecute) and fail with ResourceAlreadyExistsException don't wait for shards to become available, and will error out with a missing shard exception.

@Mpdreamz
Copy link
Member

Mpdreamz commented Feb 5, 2020

I think this one relates as well: #45250

We see this error fairly often in the .NET client CI:elastic/elasticsearch-net#4280

@tvernum
Copy link
Contributor

tvernum commented Feb 6, 2020

I think the above two comments specifically refer to #46214

@rjernst rjernst added the Team:Security Meta label for security team label May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>refactoring :Security/Security Security issues without another label Team:Security Meta label for security team
Projects
None yet
Development

No branches or pull requests

6 participants