CSPL-4878: Add operator-driven TLS certificate configuration for server and input (S2S) certs#906
Open
minjieqiu wants to merge 3 commits into
Open
CSPL-4878: Add operator-driven TLS certificate configuration for server and input (S2S) certs#906minjieqiu wants to merge 3 commits into
minjieqiu wants to merge 3 commits into
Conversation
Introduces two new task files: - configure_splunk_certs.yml: dispatcher that checks for operator-mounted cert directories under /mnt/tls/ and includes per-cert-type tasks - configure_server_cert.yml: reads tls.crt, tls.key, ca.crt from /mnt/tls/splunk-server-tls-cert/, generates an ephemeral passphrase, encrypts the private key, bundles cert+key into server-bundle.pem, and configures server.conf [sslConfig] stanzas Adds include of configure_splunk_certs.yml in main.yml before the existing enable_splunkd_ssl.yml step, gated on Linux only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds configure_input_cert.yml: reads tls.crt, tls.key, ca.crt from /mnt/tls/splunk-input-tls-cert/, generates an ephemeral passphrase, encrypts the private key, bundles cert+key into input-bundle.pem, and configures inputs.conf [SSL] stanzas (serverCert, sslPassword, sslRootCAPath). Updates configure_splunk_certs.yml dispatcher to check for the input cert mount and include configure_input_cert.yml when present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use splunk-server-bundle.pem and splunk-server-ca.pem instead of server-bundle.pem and splunk-ca.pem, consistent with the input cert naming (input-bundle.pem, splunk-input-ca.pem). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Introduces Ansible support for mounting and configuring TLS certificates delivered by the Splunk Operator (SOK) as Kubernetes Secrets. This is the format-adaptor layer of the SOK Certificate Management design (Phase 1).
configure_splunk_certs.yml— dispatcher that checks for operator-mounted cert directories under/mnt/tls/and conditionally includes per-cert-type tasks. If a cert directory is absent, Ansible skips it entirely with no error.configure_server_cert.yml— readstls.crt,tls.key,ca.crtfrom/mnt/tls/splunk-server-tls-cert/, generates an ephemeral passphrase, encrypts the private key, bundles cert+key intosplunk-server-bundle.pem, and configuresserver.conf [sslConfig](serverCert,sslPassword,sslRootCAPath).configure_input_cert.yml— same flow for S2S input cert, reads from/mnt/tls/splunk-input-tls-cert/, configuresinputs.conf [SSL], outputssplunk-input-bundle.pemandsplunk-input-ca.pem.configure_splunk_certs.ymlintomain.ymlbefore the existingenable_splunkd_ssl.ymlstep, gated on Linux only.Design Notes
web) requires only a newstat+include_tasksentry in the dispatcher and a corresponding task file.splunk-<role>-bundle.pem/splunk-<role>-ca.pempattern across all cert types.Test Plan
splunk-server-tls-certsecret withtls.crt,tls.key,ca.crt— verifysplunk-server-bundle.pemcreated andserver.conf [sslConfig]configured correctlysplunk-input-tls-certsecret — verifysplunk-input-bundle.pemcreated andinputs.conf [SSL]configured correctly