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

Add separate certificates section #433 #6881

Conversation

AntonEliatra
Copy link
Contributor

Description

Adding section on separate certificates for client and server on transport TLS layer

Issues Resolved

Part of issue here #433

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
@Naarcha-AWS Naarcha-AWS added 3 - Tech review PR: Tech review in progress security backport 2.13 PR: Backport label for 2.13 labels Apr 8, 2024
@hdhalter hdhalter changed the title adding separate certificates section #433 Add separate certificates section #433 Apr 8, 2024
@hdhalter
Copy link
Contributor

hdhalter commented Apr 8, 2024

@scrawfor99 - Can you please review? @AntonEliatra - please ignore the Vale errors for now. **update: this is now fixed and truststore is accepted as a valid term. Thanks!

Copy link
Contributor

@stephen-crawford stephen-crawford left a comment

Choose a reason for hiding this comment

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

Looks good from the technical details perspective. The two intro lines seem a little confusing to me so maybe reword those.

## Separate client and server certificates for transport layer TLS

By default, transport layer TLS certificates need to be configured as both client (`TLS Web Client Authentication`) and server (`TLS Web Server Authentication`) in the certificate's `Extended Key Usage` section, as they take responsibility as server and client in internal communication between nodes.
If you want to use separate certificates as client and server, you need to add following line to `opensearch.yml` and settings outlined in [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If you want to use separate certificates as client and server, you need to add following line to `opensearch.yml` and settings outlined in [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files)
If you want to use separate certificates as client and server, you need to add following line to `opensearch.yml` and settings outlined in [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files)
Suggested change
If you want to use separate certificates as client and server, you need to add following line to `opensearch.yml` and settings outlined in [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files)
If you want to use separate client and server certificates, you need to add following line and settings to `opensearch.yml`. You can also find steps on creating [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files) by following the hotlinks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@scrawfor99 Thanks for the above, this part is a bit tricky, as main opensearch.yml line is common in both cases, and the two options that follow are different.

Do you think below is more clear

If you want to use separate certificates as client and server, you need to add plugins.security.ssl.transport.extended_key_usage_enabled: truetoopensearch.yml, then configure settings outlined in [separate client and server X.509 PEM certificates and PKCS #8 keys]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-x509-pem-certificates-and-pkcs-8-keys) or [separate client and server Keystore and truststore files]({{site.url}}{{site.baseurl}}/security/configuration/tls/#separate-client-and-server-keystore-and-truststore-files)

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
@Naarcha-AWS Naarcha-AWS added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Apr 10, 2024
@@ -77,6 +76,41 @@ Name | Description
`plugins.security.ssl.http.truststore_password` | Truststore password. Default is `changeit`.


## Separate client and server certificates for transport layer TLS

By default, transport layer TLS certificates need to be configured as both client (`TLS Web Client Authentication`) and server (`TLS Web Server Authentication`) in the certificate's `Extended Key Usage` section, as they take responsibility as server and client in internal communication between nodes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
By default, transport layer TLS certificates need to be configured as both client (`TLS Web Client Authentication`) and server (`TLS Web Server Authentication`) in the certificate's `Extended Key Usage` section, as they take responsibility as server and client in internal communication between nodes.
By default, transport layer TLS certificates need to be configured as both client (`TLS Web Client Authentication`) and server (`TLS Web Server Authentication`) in the certificate's `Extended Key Usage` section, because the certificates are responsible for the server's and client's internal communication between nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Naarcha-AWS would it be a better explanation to say instead of:

-because the certificates are responsible for the server's and client's internal communication between nodes.

+bacause the nodes using the TLS certificates take on the responsibility of serving and receiving the communication requests internally.

Copy link
Collaborator

@Naarcha-AWS Naarcha-AWS left a comment

Choose a reason for hiding this comment

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

We could make similar changes to the other sections on the page. That's up to you though.

_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
AntonEliatra and others added 2 commits April 15, 2024 09:31
Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels Apr 17, 2024
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@AntonEliatra @Naarcha-AWS Please see my changes and let me know if you have any questions. Thanks!

_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
_security/configuration/tls.md Outdated Show resolved Hide resolved
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
@Naarcha-AWS Naarcha-AWS merged commit 77fb6ce into opensearch-project:main Apr 18, 2024
5 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 18, 2024
* adding separate certificates section #433

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Update tls.md

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Update tls.md

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Apply suggestions from code review

Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Update tls.md

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Update tls.md

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

---------

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Co-authored-by: Heather Halter <HDHALTER@AMAZON.COM>
Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
(cherry picked from commit 77fb6ce)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Editorial review PR: Editorial review in progress backport 2.13 PR: Backport label for 2.13 security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants