Skip to content

Conversation

@bizybot
Copy link
Contributor

@bizybot bizybot commented Apr 4, 2019

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

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
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

Yogesh Gaikwad added 2 commits April 7, 2019 16:31
- Split unit test with clear purpose
- Move to integ tests instead of rest api test
- filter authorized indices before other tests in resolver
@bizybot
Copy link
Contributor Author

bizybot commented Apr 8, 2019

Hi @talevy, I have added a new test case in PermissionsIT. I see you last worked on PermissionsIT.
Could you please take a look at this change? Thank you.

@bizybot bizybot requested a review from talevy April 8, 2019 22:23
@polyfractal polyfractal removed the v7.0.0 label Apr 9, 2019
@bizybot
Copy link
Contributor Author

bizybot commented Apr 11, 2019

@elasticmachine run elasticsearch-ci/2

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

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

LGTM, sorry for the delay!

I suggest when merging to change the name of the commit/PR, to something more representative such as: "put mapping authorization for aliases with write-index"

@bizybot
Copy link
Contributor Author

bizybot commented Apr 12, 2019

Hi @tvernum I have addressed your review comments, please review when you get some time. Thank you.

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, but I have 1 suggestion.

@bizybot bizybot added the v7.0.1 label Apr 16, 2019
@bizybot bizybot changed the title Consider write index when authorizing on alias for multiple indices put mapping authorization for alias with write-index and multiple read indices Apr 16, 2019
@bizybot bizybot merged commit ebf7920 into elastic:master Apr 17, 2019
bizybot added a commit to bizybot/elasticsearch that referenced this pull request 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 pull request 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 pull request 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 pull request 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 pull request 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 pull request 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
@jaymode jaymode changed the title put mapping authorization for alias with write-index and multiple read indices Fix put mapping authorization for aliases with a write-index and multiple read indices Apr 29, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ILM policy Rollover action fails in case alias points to more than one index

7 participants