Symptom
Cribl Stream Splunk HEC and Cribl HTTP Sources fail to initialize when TLS uses an encrypted private key and a certificate is selected.
The Worker log shows:
TLS validation error: bad decrypt. Is the passphrase correct?
The passphrase has been confirmed correct, the certificate and key match, and an unencrypted PEM copy of the exact same private key works successfully.
Environment
- Cribl Stream 4.20.2
- Splunk HEC Source or Cribl HTTP Source
- TLS-enabled source with a selected certificate
- PEM-encoded PKCS#8 private key, encrypted with AES-256 / PBKDF2 /SHA-256
Resolution
Splunk HEC Source
- Navigate to Data > Sources.
- Open the affected Splunk HEC source.
- Open TLS Settings (Server Side).
- Leave the existing certificate selected in Certificate name.
- Clear the Passphrase field.
- Enter the private-key passphrase in Passphrase.
- Click Save.
- Commit the updated configuration.
- Deploy the updated configuration.
Cribl HTTP Source
- Open the affected Cribl HTTP source.
- Open TLS Settings (Server Side).
- Leave the existing certificate selected in Certificate name.
- Clear the Passphrase field.
- Enter the private-key passphrase in Passphrase.
- Click Save.
- Commit the updated configuration.
- Deploy the updated configuration.
- Do not select the certificate again after entering the passphrase.
Cause
This can be caused by:
- Selecting a certificate for a source without separately entering its private-key passphrase in the source’s TLS settings. The passphrase from the certificate is not carried onto the source.
- Selecting the certificate again after entering the source passphrase, which replaces the passphrase entered on the source.
