Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.

### Fixed

- Previously we had a bug that could lead to missing certificates ([#753]).
- Fix keytool behavior that could lead to missing certificates ([#753], [#756]).

This could be the case when the Stackable PKI rotated its CA certificate or you specified multiple
CAs in your SecretClass.
Expand All @@ -30,6 +30,7 @@ All notable changes to this project will be documented in this file.
[#752]: https://github.com/stackabletech/druid-operator/pull/752
[#753]: https://github.com/stackabletech/druid-operator/pull/753
[#755]: https://github.com/stackabletech/druid-operator/pull/755
[#756]: https://github.com/stackabletech/druid-operator/pull/756

## [25.7.0] - 2025-07-23

Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/authentication/ldap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn prepare_container_commands(
command: &mut Vec<String>,
) {
if let Some(tls_ca_cert_mount_path) = provider.tls.tls_ca_cert_mount_path() {
command.push(add_cert_to_trust_store_cmd(
command.extend(add_cert_to_trust_store_cmd(
&tls_ca_cert_mount_path,
STACKABLE_TLS_DIR,
TLS_STORE_PASSWORD,
Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/authentication/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn main_container_commands(
command: &mut Vec<String>,
) {
if let Some(tls_ca_cert_mount_path) = provider.tls.tls_ca_cert_mount_path() {
command.push(add_cert_to_jvm_trust_store_cmd(&tls_ca_cert_mount_path))
command.extend(add_cert_to_jvm_trust_store_cmd(&tls_ca_cert_mount_path))
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ impl DruidRole {

if let Some(s3) = s3 {
if let Some(ca_cert_file) = s3.tls.tls_ca_cert_mount_path() {
commands.push(add_cert_to_jvm_trust_store_cmd(&ca_cert_file));
commands.extend(add_cert_to_jvm_trust_store_cmd(&ca_cert_file));
}
}

Expand Down
10 changes: 5 additions & 5 deletions rust/operator-binary/src/crd/security.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,14 +475,14 @@ pub fn add_cert_to_trust_store_cmd(
cert_file: &str,
destination_directory: &str,
store_password: &str,
) -> String {
) -> Vec<String> {
let truststore = format!("{destination_directory}/truststore.p12");
format!(
"cert-tools generate-pkcs12-truststore --pkcs12 {truststore}:{store_password} --pem {cert_file} --out {truststore} --out-password {store_password}"
)
vec![format!(
"if [ -f {truststore} ]; then cert-tools generate-pkcs12-truststore --pkcs12 {truststore}:{store_password} --pem {cert_file} --out {truststore} --out-password {store_password}; else cert-tools generate-pkcs12-truststore --pem {cert_file} --out {truststore} --out-password {store_password}; fi"
)]
}

/// Generate a bash command to add a CA to the truststore that is passed to the JVM
pub fn add_cert_to_jvm_trust_store_cmd(cert_file: &str) -> String {
pub fn add_cert_to_jvm_trust_store_cmd(cert_file: &str) -> Vec<String> {
add_cert_to_trust_store_cmd(cert_file, "/stackable", STACKABLE_TRUST_STORE_PASSWORD)
}
2 changes: 1 addition & 1 deletion tests/templates/kuttl/ldap/20-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
commands:
- script: kubectl exec -n $NAMESPACE test-druid-0 -- python /tmp/authcheck.py
timeout: 60
timeout: 180