Repository navigation
feat(tls): mutual TLS (PEM client cert/key) + PEM-honest URI keys (#18) - #20
Merged
rigazilla merged 1 commit intoNov 12, 2026
Merged
Conversation
…finispan#18) Add client-certificate (mutual TLS) support and remove the trust-store URI key ambiguity, staying PEM-only (no JKS/PKCS12). Mutual TLS: - TlsConfig gains cert_file / key_file / key_password (all PEM). - Connection::startTls loads the client cert chain + private key (SSL_CTX_use_certificate_chain_file / use_PrivateKey_file / check_private_key) and supplies the key passphrase via a passwd callback so an encrypted key never blocks on a terminal prompt. Cert and key must be set together. PEM-honest URI keys: - trust_store_file_name -> ca_file; new client_cert_file / client_key_file / client_key_password. - The Java keystore keys (trust_store_*, key_store_*, key_alias) are now rejected with a redirect to the PEM equivalent instead of a generic "not supported yet", so a ported Java URI fails fast with the exact fix rather than silently misreading a .jks as PEM. Deliberate backward-compat break on the shipped infinispan#18 key. Tests/fixtures: - +4 mutual-TLS unit cases (success, missing-cert rejection, cert-without-key, cert/key mismatch) and URI parse/redirect cases; 266 unit tests pass. - New PEM client fixtures (client.pem/client.key/clientca.pem); gen-test-certs.sh extended to reproduce them. TlsIntegrationTest URI updated to ca_file. - TLS 1.3 note: a missing-client-cert rejection surfaces on first I/O, not at connect(); the test asserts across connect()+first I/O. Docs: STATUS.md, DECISIONS.md (superseding entry), security.adoc, README.md. Co-Authored-By: Claude Opus 4.8 <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
Adds client-certificate (mutual TLS) support and removes the trust-store URI key ambiguity, staying PEM-only (no JKS/PKCS12).
Mutual TLS
TlsConfiggainscert_file/key_file/key_password(all PEM).Connection::startTlsloads the client cert chain + private key (SSL_CTX_use_certificate_chain_file/use_PrivateKey_file/check_private_key) and supplies the key passphrase via a passwd callback so an encrypted key never blocks on a terminal prompt. Cert and key must be set together (fail-fast otherwise).PEM-honest URI keys
trust_store_file_name→ca_file; newclient_cert_file/client_key_file/client_key_password.trust_store_*,key_store_*,key_alias) are now rejected with a redirect to the PEM equivalent instead of a generic "not supported yet", so a ported Java URI fails fast with the exact fix rather than silently misreading a.jksas PEM.trust_store_file_name; recorded as a superseding entry indocs/DECISIONS.md.Tests & fixtures
client.pem/client.key/clientca.pem);gen-test-certs.shextended to reproduce them.TlsIntegrationTestURI updated toca_file.-Werror, Debug and Release.Notes
connect()(production does a PING/SASL next, so it's caught). Documented; the test asserts acrossconnect()+ first I/O.TlsIntegrationTeststill needs the server configured to require client certs (tracked in STATUS backlog).Docs updated:
STATUS.md,DECISIONS.md,security.adoc,README.md.🤖 Generated with Claude Code
Closes #21.