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

Migrated Snapshot and Restore tests to use test user #126011

Conversation

cuff-links
Copy link
Contributor

This PR is part of the meta issue #60815 to migrate functional tests to use test_user.

@LeeDr
Copy link

LeeDr commented Feb 22, 2022

@cuff-links could you mention any doc links you found that either have the required privs defined or need to have them defined? I don't really know if cluster: manage should be required?

@LeeDr
Copy link

LeeDr commented Feb 22, 2022

@elasticmachine merge upstream

@cuff-links
Copy link
Contributor Author

@cuff-links could you mention any doc links you found that either have the required privs defined or need to have them defined? I don't really know if cluster: manage should be required?

As far as the elasticsearch privileges go, I referenced https://www.elastic.co/guide/en/elasticsearch/reference/8.0/security-privileges.html. That's where I got the snapshot permission. cluster:manage I added because I saw that some previous tests did the same thing and I was doing some trial and error. I added that one after I got a CI failure showing that the user wasn't authorized. I don't find the docs to be super clear on what's required.

@cuff-links
Copy link
Contributor Author

jenkins test this

@cuff-links
Copy link
Contributor Author

Per https://www.elastic.co/guide/en/elasticsearch/reference/master/snapshots-register-repository.html#snapshot-repo-prereqs, the required permissions are:

Cluster privileges: monitor, manage_slm, cluster:admin/snapshot, and cluster:admin/repository
Index privilege: all on the monitor index

Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

LGTM - code review only

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cuff-links cuff-links merged commit d746bd4 into elastic:main Feb 24, 2022
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 28, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 126011 or prevent reminders by adding the backport:skip label.

1 similar comment
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 126011 or prevent reminders by adding the backport:skip label.

cuff-links added a commit to cuff-links/kibana that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
cuff-links added a commit to cuff-links/kibana that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
cuff-links added a commit to cuff-links/kibana that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
cuff-links added a commit that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
cuff-links added a commit that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 1, 2022
cuff-links added a commit that referenced this pull request Mar 1, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d746bd4)
lucasfcosta pushed a commit to lucasfcosta/kibana that referenced this pull request Mar 2, 2022
* Migrated Snapshot and Restore tests to use test user.

* added another permission to address unauthorized failure.

* Added metadata perms for kibana administration.

* Testing out different permissions.

* Edited test to not refresh page after role is set. Causing errors.

* Adjusted perms per documentation.

* Addded link to the documentation specifying the permissions needed for snapshot restore.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
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.

4 participants