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

Add a new async search security origin #52141

Merged

Conversation

albertzaharovits
Copy link
Contributor

Creates a new security origin, and an associated reserved user and role _async_search, which can be used by internal clients to manage the .async-search-* restricted index namespace.

I think we will also need to create a new origin for ILM since the .async-search-* restricted indices are managed by ILM and ILM uses the xpack security origin which doesn't have restricted indices privileges.

CC @jimczi
Relates #49931 #50294

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authorization)

@albertzaharovits
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/bwc

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

String origin = randomFrom(ClientHelper.ML_ORIGIN, ClientHelper.WATCHER_ORIGIN, ClientHelper.DEPRECATION_ORIGIN,
ClientHelper.MONITORING_ORIGIN, ClientHelper.PERSISTENT_TASK_ORIGIN, ClientHelper.INDEX_LIFECYCLE_ORIGIN);
assertSwitchBasedOnOriginAndExecute(origin, XPackUser.INSTANCE);
for (String origin : Arrays.asList(ClientHelper.ML_ORIGIN, ClientHelper.WATCHER_ORIGIN, ClientHelper.DEPRECATION_ORIGIN,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

…ecurity/authz/store/CompositeRolesStoreTests.java

Co-Authored-By: Tim Vernum <tim@adjective.org>
@albertzaharovits albertzaharovits merged commit 97f6e97 into elastic:master Feb 11, 2020
@albertzaharovits albertzaharovits deleted the async-search-security-origin branch February 11, 2020 15:41
albertzaharovits added a commit that referenced this pull request Feb 11, 2020
This commit adds a new security origin, and an associated reserved user
and role, named `_async_search`, which can be used by internal clients to
manage the `.async-search-*` restricted index namespace.
@albertzaharovits
Copy link
Contributor Author

I think we will also need to create a new origin for ILM since the .async-search-* restricted indices are managed by ILM and ILM uses the xpack security origin which doesn't have restricted indices privileges.

This is not required. Looks like the async search pllugin does not use ILM managed indices anymore. Even if it would, the ILM security origin must never be granted privileges over restricted indices because that would allow any user with privileges for ILM to interfere with restricted indices, even if it does not have privileges over restricted indices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants