Skip to content

[Test] Fix FollowIndexSecurityIT by granting needed previleges #84467

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

Merged
merged 1 commit into from
Mar 1, 2022

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Mar 1, 2022

CCR user on the leader cluster needs more privileges than what are
documented (#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with #61308.

Resolves: #84156

CCR user on the leader cluster needs more privileges than what are
documented (elastic#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with elastic#61308.

Resolves: elastic#84156
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC v8.2.0 labels Mar 1, 2022
@ywangd ywangd requested a review from tvernum March 1, 2022 01:30
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Mar 1, 2022
@elasticmachine
Copy link
Collaborator

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

Comment on lines -9 to -10
- manage_leader_index
- view_index_metadata
Copy link
Member Author

Choose a reason for hiding this comment

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

Neither of these privileges are documented as part of CCR. So the documentation is broken for more than just the retention lease renewal action. I added a comment here to track necessary documentation changes.

@ywangd ywangd merged commit e1202dd into elastic:master Mar 1, 2022
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Mar 1, 2022
…ic#84467)

CCR user on the leader cluster needs more privileges than what are
documented (elastic#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with elastic#61308.

Resolves: elastic#84156
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.1

elasticsearchmachine pushed a commit that referenced this pull request Mar 1, 2022
… (#84471)

CCR user on the leader cluster needs more privileges than what are
documented (#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with #61308.

Resolves: #84156

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@idegtiarenko
Copy link
Contributor

idegtiarenko commented Mar 23, 2022

Hello @ywangd, I just noticed the same failure has happened on 7.17 branch recently: https://gradle-enterprise.elastic.co/s/p2tu4w364dzs6

Do you mind back-porting the fix there as well?

ywangd added a commit to ywangd/elasticsearch that referenced this pull request Mar 31, 2022
…ic#84467)

CCR user on the leader cluster needs more privileges than what are
documented (elastic#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with elastic#61308.

Resolves: elastic#84156
@ywangd
Copy link
Member Author

ywangd commented Mar 31, 2022

Raised backport (#85514) for 7.17

elasticsearchmachine pushed a commit that referenced this pull request Mar 31, 2022
… (#85514)

CCR user on the leader cluster needs more privileges than what are
documented (#61308). Specifically it needs to renew the retention lease
at a fixed time interval. This PR fixes it by granting the "manage"
index privilege to the CCR user on the leader cluster.

Note we still want to revisit privileges required CCR or at least fix
our documentation. This will be tracked with #61308.

Resolves: #84156
@idegtiarenko
Copy link
Contributor

Thank you!

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Apr 25, 2022
Now elastic#84467 has been backported to 7.17 (elastic#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in elastic#85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes elastic#84888
tlrx added a commit that referenced this pull request Apr 26, 2022
…86140)

Now #84467 has been backported to 7.17 (#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in #85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes #84888
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Apr 26, 2022
…lastic#86140)

Now elastic#84467 has been backported to 7.17 (elastic#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in elastic#85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes elastic#84888
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Apr 26, 2022
…lastic#86140)

Now elastic#84467 has been backported to 7.17 (elastic#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in elastic#85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes elastic#84888
elasticsearchmachine pushed a commit that referenced this pull request Apr 26, 2022
…86140) (#86172)

Now #84467 has been backported to 7.17 (#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in #85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes #84888
elasticsearchmachine pushed a commit that referenced this pull request Apr 26, 2022
…86140) (#86174)

Now #84467 has been backported to 7.17 (#85514) the recent failures
are always due to monitoring docs not being indexed in monitoring
indices within 30s.

Similarly to what has been done for `AutoFollowIT.testAutoFollowPatterns()`
in #85278 which reduced the number of failures, we can wait longer in
`FollowIndexSecurityIT.testAutoFollowPatterns()` for monitoring docs
to be indexed.

Closes #84888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.1.1 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entire FollowIndexSecurityIT suite sometimes fails
5 participants