-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ILM policy Rollover action fails in case alias points to more than one index #40831
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
Labels
>bug
:Data Management/ILM+SLM
Index and Snapshot lifecycle management
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
Comments
Pinging @elastic/es-core-features |
Pinging @elastic/es-security |
bizybot
pushed a commit
to bizybot/elasticsearch
that referenced
this issue
Apr 4, 2019
When same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling for PutMappingRequest filtered out such aliases making the request unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias. Closes elastic#40831
bizybot
pushed a commit
to bizybot/elasticsearch
that referenced
this issue
Apr 4, 2019
When same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of put mapping request to resolve authorized indices had a check on indices size. If multiple indices existed then it marks request unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias. Closes elastic#40831
bizybot
added a commit
that referenced
this issue
Apr 17, 2019
…d indices (#40834) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes #40831
bizybot
added a commit
to bizybot/elasticsearch
that referenced
this issue
Apr 17, 2019
…d indices (elastic#40834) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes elastic#40831
bizybot
added a commit
to bizybot/elasticsearch
that referenced
this issue
Apr 17, 2019
…d indices (elastic#40834) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes elastic#40831
bizybot
added a commit
that referenced
this issue
Apr 17, 2019
…d indices (#40834) (#41288) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes #40831
bizybot
added a commit
that referenced
this issue
Apr 17, 2019
…d indices (#40834) (#41287) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes #40831
bizybot
added a commit
to bizybot/elasticsearch
that referenced
this issue
Apr 17, 2019
…d indices (elastic#40834) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes elastic#40831
bizybot
added a commit
that referenced
this issue
Apr 17, 2019
…d indices (#40834) (#41289) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes #40831
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this issue
May 27, 2019
…d indices (elastic#40834) When the same alias points to multiple indices we can write to only one index with `is_write_index` value `true`. The special handling in case of the put mapping request(to resolve authorized indices) has a check on indices size for a concrete index. If multiple indices existed then it marked the request as unauthorized. The check has been modified to consider write index flag and only when the requested index matches with the one with write index alias, the alias is considered for authorization. Closes elastic#40831
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Data Management/ILM+SLM
Index and Snapshot lifecycle management
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
Elasticsearch version (
bin/elasticsearch --version
): 6.6.2Description of the problem including expected versus actual behavior:
Rollover action via ILM fails with unauthorized access when the user does
not have access to concrete index but only to alias.
This only happens when
is_write_index
is true, that is after the rolloverwe can have rolled over-index with the same alias.
The authorization check fails as
IndicesAndAliasesResolver#getPutMappingIndexOrAlias
filtersout the alias name as it has multiple indices associated with it. For multiple indexes for the given alias, we should check if there is only one write index associated with it instead of simple size check.
elasticsearch/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java
Lines 249 to 253 in c737943
Expected behavior:
The rollover action should succeed resulting in successful policy run.
Actual behavior:
Fails with
Steps to reproduce:
ufoo
)Fails with :
The text was updated successfully, but these errors were encountered: