-
Notifications
You must be signed in to change notification settings - Fork 210
Remote clusters strong identity verification configuration on ECH #4895
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
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5f57f91
initial attempt rcs with strong identity verification on ECH
eedugon 3f195cc
merging from main
eedugon 6941696
separate doc added
eedugon aa5065f
refinement single page
eedugon 8409830
removed tab
eedugon dbe372f
updated links and security models page
eedugon 6d1cd75
Merge remote-tracking branch 'origin/main' into remote_clusters_ech_s…
eedugon 6fee183
Apply suggestions from code review
eedugon aeaf6fe
applying suggestions
eedugon 4547750
applying suggestions
eedugon cffdd7b
Merge branch 'main' into remote_clusters_ech_strong_identity
eedugon c77db25
final refinement
eedugon d8be3d2
Merge remote-tracking branch 'origin/main' into remote_clusters_ech_s…
eedugon fe21977
covering ECE and ECK slighlty
eedugon 6c6fa32
Apply suggestions from code review
eedugon 9092166
snippet intro feature uncommented
eedugon f4b321f
Merge branch 'main' into remote_clusters_ech_strong_identity
eedugon a79c011
Merge branch 'main' into remote_clusters_ech_strong_identity
eedugon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
deploy-manage/remote-clusters/_snippets/rcs_strong_identity_how.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| When a local cluster makes a request to a remote cluster using a cross-cluster API key: | ||
|
|
||
| 1. The local cluster signs the request headers with its configured private key and sends the signature and certificate chain as header | ||
| in the request to the remote cluster. | ||
| 2. The remote cluster verifies that the API key is valid. | ||
| 3. If the API key has a certificate identity pattern configured, the remote cluster extracts the Distinguished Name (DN) from the | ||
| certificate chain's leaf certificate and matches it against the certificate identity pattern. | ||
| 4. The remote cluster validates that the provided certificate chain is trusted. | ||
| 5. The remote cluster validates the signature and checks that the certificate is not expired. | ||
|
|
||
| If any of these validation steps fail, the request is rejected. |
9 changes: 9 additions & 0 deletions
9
deploy-manage/remote-clusters/_snippets/rcs_strong_identity_intro.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Cross-cluster API keys can be configured with strong identity verification to provide an additional layer of security. To enable this feature, a | ||
| cross-cluster API key is created on the remote cluster with a certificate identity pattern that specifies which certificates are allowed | ||
| to use it. The local cluster must then sign each request with its private key and include a certificate whose subject Distinguished Name | ||
| (DN) matches the pattern. The remote cluster validates both that the certificate is trusted by its configured certificate authorities | ||
| and that the certificate's subject matches the API key's identity pattern. | ||
|
|
||
| :::{note} | ||
| Each remote cluster alias on the local cluster can have different remote signing configurations. | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
deploy-manage/remote-clusters/ec-remote-cluster-strong-identity.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| navigation_title: Strong identity verification | ||
| applies_to: | ||
| deployment: | ||
| ess: ga | ||
| products: | ||
| - id: cloud-hosted | ||
| --- | ||
|
|
||
| # Strong identity verification on {{ech}} | ||
|
|
||
| Starting with {{stack}} 9.3, the [API key security model](./security-models.md) for remote cluster connections supports [strong identity verification](./security-models.md#remote-cluster-strong-verification). This adds an extra layer of security by allowing an API key to be used only by requests that present an allowed certificate identity, which the remote cluster validates during authentication. | ||
|
|
||
| This document describes how to enable strong identity verification for {{ech}} deployments and is intended to augment the standard remote cluster setup tutorials. While following the steps to [configure remote clusters](./ec-enable-ccs.md#set-up-remote-clusters-with-ech) with API key authentication, apply the additional settings and procedures described here. Some settings can be applied independently, while others note the stage in the procedure where you should apply them. | ||
|
|
||
| :::{note} | ||
| For steps to configure strong identity verification for other deployment types, refer to [Strong identity verification](./remote-clusters-api-key.md#remote-cluster-strong-verification). | ||
| ::: | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Both the local and remote clusters must run {{stack}} 9.3 or later to use strong identity verification. | ||
|
|
||
| ## Configure strong identity verification | ||
|
|
||
| To use strong identity verification, both the local and remote clusters must be configured to sign and verify cross-cluster request headers. All settings described in this guide are dynamic and can be configured using the [cluster settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) or as static [`elasticsearch.yml` configuration](/deploy-manage/stack-settings.md#configure-stack-settings) settings. | ||
|
|
||
| For a full list of available strong identity verification settings for remote clusters, refer to the [remote cluster settings reference](elasticsearch://reference/elasticsearch/configuration-reference/remote-clusters.md#remote-cluster-signing-settings). | ||
|
|
||
| ### On the local cluster | ||
|
|
||
| When adding the remote cluster to the local cluster, you must configure it to sign cross-cluster requests with a TLS certificate–private key pair. You can either generate and use your own certificate for this purpose or reuse an existing certificate. | ||
|
|
||
| This example configures the local cluster to use the existing transport certificates to sign cross-cluster requests. These certificate files are present in all {{ecloud}} deployments: | ||
|
|
||
| ```yaml | ||
| cluster.remote.<my_remote_cluster>.signing.certificate: "node.crt" <1> | ||
| cluster.remote.<my_remote_cluster>.signing.key: "node.key" <1> | ||
| ``` | ||
| 1. Replace `<my_remote_cluster>` with your remote cluster alias. | ||
|
|
||
| If you use your own certificates, upload the certificate and key files [as a ZIP bundle](/deploy-manage/deploy/elastic-cloud/upload-custom-plugins-bundles.md) and reference them in the settings: | ||
|
|
||
| ```yaml | ||
| cluster.remote.<my_remote_cluster>.signing.certificate: "/app/config/<bundle-zip-directory>/<signing-cert.crt>" <1> | ||
| cluster.remote.<my_remote_cluster>.signing.key: "/app/config/<bundle-zip-directory>/<signing-key.key>" <1> | ||
| ``` | ||
| 1. Replace `<my_remote_cluster>` with your remote cluster alias, and the paths with the paths to your certificate and key files included in the bundle. | ||
|
|
||
| ### On the remote cluster | ||
|
|
||
| The certificate and key used by the local cluster to sign cross-cluster requests determine how the remote cluster must be configured. Specifically: | ||
|
|
||
| 1. Add the certificate authority (CA) that issued the local cluster certificate to the `cluster.remote.signing.certificate_authorities` setting of the remote cluster: | ||
|
|
||
| ```yaml | ||
| cluster.remote.signing.certificate_authorities: "internal_tls_ca.crt" <1> | ||
| ``` | ||
| 1. This example uses the regional CA certificate file that is available in all {{ecloud}} deployments. This CA is unique per {{ecloud}} region and cloud provider. | ||
|
|
||
| The CA file to configure depends on how the local cluster is set up: | ||
|
|
||
| * If the local cluster uses the default transport certificates, and both the local and remote clusters belong to the same cloud provided and region on {{ecloud}}, you can use the `internal_tls_ca.crt` file that already exist in your cluster. No additional upload is required. | ||
|
|
||
| * If the local cluster uses the default transport certificates, but the remote cluster belongs to a different {{ecloud}} provider or region, you must download the local cluster transport CA and upload it to the remote deployment as a bundle. To do that: | ||
| 1. Open your deployment management page in the Elastic Cloud UI and go to **Security**. | ||
| 1. Under **CA certificates**, select the download icon to save the CA into a local file. | ||
| 1. Add the CA certificate [as a ZIP bundle](/deploy-manage/deploy/elastic-cloud/upload-custom-plugins-bundles.md) in your remote deployment, and reference the file in the `cluster.remote.signing.certificate_authorities` setting. | ||
|
|
||
| * If you use custom certificates in the local cluster, upload the associated CA to the remote cluster [as a ZIP bundle](/deploy-manage/deploy/elastic-cloud/upload-custom-plugins-bundles.md), and reference the file in the `cluster.remote.signing.certificate_authorities` setting. | ||
|
|
||
| 1. When creating the cross-cluster API key on the remote cluster, you must specify a `certificate_identity` pattern that matches the Distinguished Name (DN) of the certificate used by the local cluster. | ||
|
|
||
| :::{tip} | ||
| In {{ecloud}}, the certificates of all {{es}} nodes follow this Distinguished Name (DN) format: | ||
| `CN=<node_id>.node.<cluster_id>.cluster.<scope_id>`. | ||
|
|
||
| * The {{es}} `cluster_id` of your deployment can be found on the deployment page in the {{ecloud}} UI by selecting **Copy cluster ID**. | ||
| * The `scope_id` corresponds to the {{ecloud}} organization ID. | ||
| ::: | ||
|
|
||
| This example creates a cross-cluster API key with a `certificate_identity` pattern that matches the default {{ecloud}} transport certificates for a specific `cluster_id`: | ||
|
|
||
| ```console | ||
| POST /_security/cross_cluster/api_key | ||
| { | ||
| "name": "my-cross-cluster-api-key", | ||
| "access": { | ||
| "search": [ | ||
| { | ||
| "names": ["logs-*"] | ||
| } | ||
| ] | ||
| }, | ||
| "certificate_identity": "CN=.*.node.<cluster-id>.cluster.*" <1> | ||
| } | ||
| ``` | ||
| 1. If the local cluster uses custom certificates, adjust the pattern to match their DN instead. | ||
|
|
||
| The `certificate_identity` field supports regular expressions that are matched against the certificate DN. For example: | ||
|
|
||
| * `"CN=.*.example.com,O=Example Corp,C=US"` matches any certificate whose DN starts with a CN that ends in `example.com` and includes `O=Example Corp,C=US`. | ||
| * `"CN=local-cluster.*,O=Example Corp,C=US"` matches any certificate whose DN starts with `CN=local-cluster` and includes `O=Example Corp,C=US`. | ||
| * `"CN=.*.node.<cluster-id>.cluster.*"` matches the {{ecloud}} transport certificates for a given `cluster_id`. | ||
| * `"CN=.*.node.*.cluster.<org-id>"` matches the {{ecloud}} transport certificates for all clusters in a given ECH organization. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.