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

[DOCS] Adds read_ccr and manage_ccr privileges #149

Merged
merged 4 commits into from
Nov 15, 2018

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented Nov 13, 2018

Related to elastic/elasticsearch#35434

This PR documents the new read_ccr and manage_ccr cluster privileges.

@@ -62,6 +65,9 @@ who created or updated them.

--

`read_ccr`::
TBD
Copy link
Member

Choose a reason for hiding this comment

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

Roughly: This is a cluster privilege needed on a cluster holding leader indices to grant permissions to the user to read what indices are in the cluster, read leader index metadata, and check that the user has the appropriate privileges to follow leader indices (@martijnvg double check me here please).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @jasontedor , I've drafted descriptions for these.

@@ -29,6 +29,9 @@ This includes snapshotting, updating settings, and rerouting. It also includes
obtaining snapshot and restore status. This privilege does not include the
ability to manage security.

`manage_ccr`::
TBD
Copy link
Member

Choose a reason for hiding this comment

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

Roughly: This is cluster privilege needed on a cluster holding following indices to grant permissions to manage following indices (e.g., pause, and resume) and manage auto-follow patterns (@martijnvg double check me here please).

@lcawl lcawl requested a review from martijnvg November 13, 2018 21:49
@lcawl lcawl removed the WIP Work in progress label Nov 13, 2018
@jasontedor jasontedor self-requested a review November 14, 2018 02:20
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

@lcawl I left a few comments. Looks good otherwise.

@@ -82,6 +92,10 @@ All `monitor` privileges plus index administration (aliases, analyze, cache clea
close, delete, exists, flush, mapping, open, force merge, refresh, settings,
search shards, templates, validate).

`manage_follow_index`::
All actions that are required to manage a follower index, which includes pausing
Copy link
Member

Choose a reason for hiding this comment

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

s/pausing and resuming/creating follow index, closing the index and unfollow the index.

Not that for pause and resume start the follow tasks and then read changes from leader shards and write changes into follower shards. For this write level index privilege is needed in follower index and read privilege is needed in leader index. The manage_ccr cluster level privilege is needed to start and stop shard follow tasks as part of resume and stop respectively.

Copy link
Member

Choose a reason for hiding this comment

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

I would highlight that this is an index privilege required in the following cluster only, giving the ability on the index level to manage the lifecycle of follow indices.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@martijnvg Other X-Pack API reference pages have an "Authorization" section in them, so I've drafted that content in elastic/elasticsearch#35557 based on your comments here. If it's useful, I can add that section to the other CCR API pages too.

Copy link
Member

Choose a reason for hiding this comment

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

👍 thanks!

@@ -62,6 +67,11 @@ who created or updated them.

--

`read_ccr`::
All read only {ccr} operations, such as getting information about indices and
Copy link
Member

Choose a reason for hiding this comment

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

I would highlight that this cluster level privilege only needs to be configured in the leader cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've added that info in this PR.

@@ -29,6 +29,11 @@ This includes snapshotting, updating settings, and rerouting. It also includes
obtaining snapshot and restore status. This privilege does not include the
ability to manage security.

`manage_ccr`::
All {ccr} operations related to managing follower indices and auto-follow
Copy link
Member

Choose a reason for hiding this comment

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

I would highlight that this cluster level privilege only needs to be configured in the follower cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've added that info too!

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the extra iteration!

@lcawl lcawl merged commit 36dea66 into elastic:master Nov 15, 2018
@lcawl lcawl deleted the lcawley-ccr-privs branch November 15, 2018 17:56
@lcawl
Copy link
Contributor Author

lcawl commented Nov 15, 2018

Backported to 6.x and 6.5 via 31bf97c

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.

3 participants