Skip to content

Conversation

@labrenbe
Copy link
Member

@labrenbe labrenbe commented Oct 27, 2025

Description

  • Add TLS secret operator Volumes & VolumeMounts

Part of #61

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Reviewer

  • Code contains useful comments
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@labrenbe labrenbe self-assigned this Oct 27, 2025
@labrenbe labrenbe moved this to Ready for Development in Stackable Engineering Oct 27, 2025
@labrenbe labrenbe moved this from Ready for Development to Development: In Progress in Stackable Engineering Oct 27, 2025
This was referenced Oct 28, 2025
@labrenbe labrenbe moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Oct 28, 2025
@labrenbe labrenbe marked this pull request as ready for review October 28, 2025 15:26
@siegfriedweber siegfriedweber moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 29, 2025
@siegfriedweber siegfriedweber mentioned this pull request Oct 30, 2025
2 tasks
Copy link
Member

@siegfriedweber siegfriedweber left a comment

Choose a reason for hiding this comment

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

  • The documentation is missing.
  • A changelog entry is missing.
  • If it should be possible to disable TLS on the HTTP port, then an integration test is required for this case.

@labrenbe labrenbe mentioned this pull request Nov 11, 2025
@@ -0,0 +1,55 @@
= Security
:description: Configure TLS encryption, authentication, and Open Policy Agent (OPA) authorization for Kafka with the Stackable Operator.
Copy link
Member

Choose a reason for hiding this comment

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

This is OpenSearch, not Kafka.

Comment on lines +6 to +7
The internal and client communication at the REST API can be encrypted with TLS. This requires the xref:secret-operator:index.adoc[Secret Operator] to be running in the Kubernetes cluster providing certificates.
The used certificates can be changed in a cluster-wide config. TLS encryption on the REST API may be disabled, while it is always enabled for the internal communication between nodes using the `transport` port.
Copy link
Member

Choose a reason for hiding this comment

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

Write a single sentence per line.

see https://docs.stackable.tech/home/stable/contributor/docs/style-guide/#_highlights

Please adapt the whole document.

<3> The lifetime for autoTls certificates generated by the secret operator.
Only a lifetime up to the `maxCertificateLifetime` setting in the SecretClass is applied.

The `tls` secret is deployed from the xref:secret-operator:index.adoc[Secret Operator] and looks like this:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `tls` secret is deployed from the xref:secret-operator:index.adoc[Secret Operator] and looks like this:
The `tls` secret is deployed by the xref:secret-operator:index.adoc[Secret Operator] and looks like this:

maxCertificateLifetime: 15d
----

You can create your own secrets and reference them e.g. in the `spec.clusterConfig.tls.serverSecretClass` or `spec.clusterConfig.tls.internalSecretClass` to use different certificates.
Copy link
Member

Choose a reason for hiding this comment

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

You cannot just reference the secrets. You have to create a SecretClass which references them and then use the SecretClass in the clusterConfig.

maxCertificateLifetime: 15d
----

You can create your own secrets and reference them e.g. in the `spec.clusterConfig.tls.serverSecretClass` or `spec.clusterConfig.tls.internalSecretClass` to use different certificates.
Copy link
Member

Choose a reason for hiding this comment

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

It is important to mention that the operator sets plugins.security.nodes_dn to ["CN=generated certificate for pod"]. That means that the authentication between the nodes is weak. If a user wants to increase the security and use certificates which really identify the OpenSearch nodes, they also must adapt the mentioned setting.

pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
{% if test_scenario['values']['server-use-tls'] == 'false' %}
Copy link
Member

Choose a reason for hiding this comment

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

The metrics test does not depend on server-use-tls (and it also should not).

Copy link
Member

Choose a reason for hiding this comment

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

This file seems to be destroyed by automatic merges. There are two config sections and the integration test does not pass.

apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 600
timeout: 120
Copy link
Member

Choose a reason for hiding this comment

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

I also reduce this timeout when testing locally. But when executed on Jenkins, the deployment can take a while and I fear that we introduce test flakiness with this timeout.

use_ssl = True,
verify_certs = True,
use_ssl = http_use_tls,
verify_certs = http_use_tls,
Copy link
Member

Choose a reason for hiding this comment

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

verify_certs can stay True.

Suggested change
verify_certs = http_use_tls,
verify_certs = True,

- Add the role group as a node attribute ([#63]).
- Allow the configuration of TLS for the HTTP and TRANSPORT ports with the operator ([#55]).

[#63]: https://github.com/stackabletech/opensearch-operator/pull/63
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[#63]: https://github.com/stackabletech/opensearch-operator/pull/63
[#55]: https://github.com/stackabletech/opensearch-operator/pull/55
[#63]: https://github.com/stackabletech/opensearch-operator/pull/63

Copy link
Member

Choose a reason for hiding this comment

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

This file is not referenced in nav.adoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

3 participants