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] Update remote cluster docs #77043

Merged

Conversation

lockewritesdocs
Copy link
Contributor

@lockewritesdocs lockewritesdocs commented Aug 30, 2021

This PR seeks to pull out CCR and CCS information that relates to using those features and integrate it as part of configuring remote clusters. This PR includes the following changes (and more):

  • Consolidate the remote cluster docs into a single location
  • Incorporate roles needed for CCR and CCS into the remote cluster docs
  • Integrate and clarify the security docs for CCS
  • Add security docs for CCR that mirror the updated CCS docs
  • Simplify the CCR tutorial to make it more self-contained
  • Redirect moved or removed pages

Preview links

Remote clusters

Closes #40724

Relates to #72841

@lockewritesdocs lockewritesdocs added :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >docs General docs changes :Security/Security Security issues without another label labels Sep 8, 2021
@lockewritesdocs lockewritesdocs marked this pull request as ready for review September 8, 2021 21:23
@elasticmachine elasticmachine added Team:Docs Meta label for docs team Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Security Meta label for security team labels Sep 8, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticmachine
Copy link
Collaborator

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

@lockewritesdocs
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

Thanks for working on this topic, Adam. Some (many?) of the comments are probably on existing texts which you just moved around. I am OK if you prefer to skip them for this PR and have them addressed in follow-ups.

I think one major thing we'd like to achieve with this PR is to make the help docs read more logically and connected for the remote cluster and features enabled by it. Hence the order of introducing each concept is important. It seems to me that we should start with "brief intro of remote cluster, what are they and relevant concept", then "configuring security for cluster connection", including both TLS setup and enabling xpack.security.enabled. This is then followed by "configuring remote clusters with Cluster Settings update API etc", then "configuring individual privileges" for CCR and CCS.

It's also worthwhile to have a few sentences to briefly talk about the main security limitation of remote clusters, i.e. they are effectively one security domain and you cannot restrict user's access purely from the remote cluster. Similar questions have been asked and answered many times previously. So I think it's helpful to clear user confusions.

Comment on lines 32 to 34
On the remote cluster that contains the leader index, the `ccr_user` requires
the `read_ccr` cluster privilege, and `monitor` and `read` privileges on the
leader index.
Copy link
Member

Choose a reason for hiding this comment

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

I raised #61308 as a bug for CCR privileges a while back. Not sure if it is still valid today. I can check it later.

@lockewritesdocs
Copy link
Contributor Author

@elasticmachine update branch

@lockewritesdocs
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

Just had another round of look. Thanks for your patience.

@lockewritesdocs
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

LGTM

I'd appreciate if you could also address the following comments before merging. There is still room for improvements. But I think they can be iterative with follow-ups. This is a step forward already. Thanks!

Comment on lines 21 to 24
clusters. Furthermore, a local user with administrative privileges at the
operating system level can alter `elasticsearch.yml`. A malicious user with
these privileges has potential access to private keys that could give them the
ability to take over a remote cluster. To use {ccr} and {ccs} safely,
Copy link
Member

Choose a reason for hiding this comment

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

It still does not read straightforward to me because it seems to suggest "alter elasticsearch.yml" is a reason for having "potential access to private keys". But these two things are separate. Maybe it's just me? I'd suggest the following change:

Suggested change
clusters. Furthermore, a local user with administrative privileges at the
operating system level can alter `elasticsearch.yml`. A malicious user with
these privileges has potential access to private keys that could give them the
ability to take over a remote cluster. To use {ccr} and {ccs} safely,
clusters. Furthermore, a local administrator at the operating system level with sufficient access
to Elasticsearch config files and private keys can potentially take over a remote cluster. To use {ccr} and {ccs} safely,

Also, I wonder whether we should take this sentence out from here because Enabing security at the Elasticsearch level does not help mitigating this threat. I think we can move it to the end of this paragraph after we finishing talking about ES level security first, something like:

Enabling and configuring security is important on both local and remote clusters. When connecting a local cluster to remote clusters, an Elasticsearch superuser (such as the elastic user) gains total read access to the remote clusters. To use cross-cluster replication and cross-cluster search safely, enable security on all connected clusters and configure Transport Layer Security (TLS) on at least the transport level on every node. Furthermore, a local administrator at the operating system level with sufficient access to Elasticsearch config files and private keys can potentially take over a remote cluster. Therefore you should treat the operating system level security for both clusters with equal importance.

I added the sentence in bold as a very generic advice for OS level security. Otherwise, it feels that we raise an issue without offering any recommendation. Please feel free to paraphrase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I split this information into two paragraphs:

Enabling and configuring security is important on both local and remote
clusters. When connecting a local cluster to remote clusters, an {es} superuser
(such as the elastic user) on the local cluster gains total read access to the
remote clusters. To use {ccr} and {ccs} safely,
<<remote-clusters-security,enable security>> on all connected clusters
and configure Transport Layer Security (TLS) on at least the transport level on
every node.

Furthermore, a local administrator at the operating system level
with sufficient access to {es} configuration files and private keys can
potentially take over a remote cluster. Ensure that your security strategy
includes securing local and remote clusters at the operating system level.

Comment on lines 19 to 23
to add a remote cluster. You can also use this API to
<<configure-remote-clusters-dynamic,apply and update>> settings across the
entire remote cluster. To configure settings on individual nodes in a remote
cluster, define
<<configure-remote-clusters-static,static settings>> in `elasticsearch.yml`.
Copy link
Member

Choose a reason for hiding this comment

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

This still reads funny to me. I think what we want to say is:

Suggested change
to add a remote cluster. You can also use this API to
<<configure-remote-clusters-dynamic,apply and update>> settings across the
entire remote cluster. To configure settings on individual nodes in a remote
cluster, define
<<configure-remote-clusters-static,static settings>> in `elasticsearch.yml`.
to add a remote cluster. You use this API to dynamically
<<configure-remote-clusters-dynamic,configure remote clusters>> for every node
in the local cluster. To configure remote clusters for an individual node of the local cluster,
define <<configure-remote-clusters-static,static settings>> in the node's `elasticsearch.yml`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change this to read:

Alternatively, use the <<cluster-update-settings,cluster update settings API>>
to add a remote cluster. You use this API to dynamically
<<configure-remote-clusters-dynamic,configure remote clusters>> for every node
in the local cluster. To configure remote clusters for individual nodes in the
local cluster, define <<configure-remote-clusters-static,static settings>> in elasticsearch.yml for each node.

Adam Locke and others added 2 commits September 22, 2021 08:55
@lockewritesdocs
Copy link
Contributor Author

@elasticmachine update branch

@lockewritesdocs lockewritesdocs added the auto-backport Automatically create backport pull requests when merged label Sep 22, 2021
@lockewritesdocs lockewritesdocs merged commit 6940673 into elastic:master Sep 22, 2021
@lockewritesdocs lockewritesdocs deleted the docs__update-remote-cluster-docs branch September 22, 2021 20:02
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts
7.15 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 77043

szabosteve pushed a commit that referenced this pull request Sep 23, 2021
* [DOCS] Update remote cluster docs

* Add files, rename files, write new stuff

* Plethora of changes

* Add test and update snippets

* Redirects, moved files, and test updates

* Moved file to x-pack for tests

* Remove older CCS page and add redirects

* Cleanup, link updates, and some rewrites

* Update image

* Incorporating user feedback and rewriting much of the remote clusters page

* More changes from review feedback

* Numerous updates, including request examples for CCS and Kibana

* More changes from review feedback

* Minor clarifications on security for remote clusters

* Incorporate review feedback

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Some review feedback and some editorial changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
# Conflicts:
#	docs/reference/modules/network.asciidoc
#	docs/reference/modules/remote-clusters.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/index.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lockewritesdocs pushed a commit that referenced this pull request Sep 23, 2021
* [DOCS] Update remote cluster docs (#77043) (#78212)

* [DOCS] Update remote cluster docs

* Add files, rename files, write new stuff

* Plethora of changes

* Add test and update snippets

* Redirects, moved files, and test updates

* Moved file to x-pack for tests

* Remove older CCS page and add redirects

* Cleanup, link updates, and some rewrites

* Update image

* Incorporating user feedback and rewriting much of the remote clusters page

* More changes from review feedback

* Numerous updates, including request examples for CCS and Kibana

* More changes from review feedback

* Minor clarifications on security for remote clusters

* Incorporate review feedback

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Some review feedback and some editorial changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
# Conflicts:
#	docs/reference/modules/network.asciidoc
#	docs/reference/modules/remote-clusters.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/cross-cluster.asciidoc
#	x-pack/docs/en/security/ccs-clients-integrations/index.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	docs/reference/redirects.asciidoc

* Remove link not applicable in redirects

* Updating redirects

* Actually updating redirects in the real file this time

* Adding missing java client link

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >docs General docs changes :Security/Security Security issues without another label Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team Team:Security Meta label for security team v7.15.1 v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOCS] Clarify security aspects for CCR
5 participants