Repository navigation
test(integration): mutual TLS + SASL PLAIN + SASL EXTERNAL coverage - #25
Merged
rigazilla merged 1 commit intoNov 13, 2026
Conversation
Add Docker-backed end-to-end tests for three features that previously had unit coverage only, closing the mutual-TLS and non-SCRAM-SASL (all but OAUTHBEARER) integration backlog items. - PLAIN: reuses the existing AuthMechanismRoundTrip fixture (infinispan-auth.xml already offers PLAIN); AuthIntegrationTests now 7 cases. - Mutual TLS: new MutualTlsIntegrationTest against infinispan-mtls.xml (require-ssl-client-auth, client-CA truststore, no SASL) — setTls(cert/key) and hotrods:// URI round-trips, plus a no-client-cert rejection. - EXTERNAL: new ExternalAuthIntegrationTest against infinispan-external.xml (mutual TLS + <truststore-realm/> + SASL EXTERNAL) — cert-identity round-trip programmatically and via a hotrods:// URI with sasl_mechanism=EXTERNAL. One parameterized start script (start_infinispan_mtls.sh [config]) serves both TLS configs; gen-test-certs.sh now also emits the integration client identity and the server truststore bundle (client leaf + CA in client-truststore.pem). New ctest label mutual-tls; EXTERNAL suite also labelled auth+tls. Server-side gotchas (see docs/DECISIONS.md): <truststore-realm/> trusts specific client leaf certs, not just the CA (hence the leaf+CA truststore bundle); and under TLS 1.3 a missing required client cert surfaces post-handshake, so the no-cert case asserts across connect()+op rather than at connect(). 284 unit + 107 integration (23 suites); Auth/Tls/MutualTls/ExternalAuth suites verified locally (7/5/3/2 pass). 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.
What
Docker-backed end-to-end integration tests for three features that previously had unit coverage only, closing the mutual-TLS and non-SCRAM-SASL (all but OAUTHBEARER) integration backlog items.
infinispan-auth.xmlalready offers PLAIN alongside the SCRAM family, so PLAIN reuses the existingAuthMechanismRoundTripfixture.AuthIntegrationTests→ 7 cases.MutualTlsIntegrationTestagainsttest-configs/infinispan-mtls.xml(require-ssl-client-auth, client-CA truststore, no SASL): programmaticsetTls(cert/key)round-trip,hotrods://URI withclient_cert_file/client_key_fileround-trip, and a no-client-cert rejection.ExternalAuthIntegrationTestagainsttest-configs/infinispan-external.xml(mutual-TLS realm +<truststore-realm/>+ SASL EXTERNAL): cert-identity round-trip programmatically and via ahotrods://URI withsasl_mechanism=EXTERNAL.One parameterized start script (
scripts/start_infinispan_mtls.sh [config]) serves both TLS configs;scripts/gen-test-certs.shnow also emits the integration client identity (client.pem/client.key) and the server truststore bundle (client-truststore.pem). New ctest labelmutual-tls; the EXTERNAL suite is also labelledauth+tls.Server-side gotchas (details in
docs/DECISIONS.md)<truststore-realm/>trusts specific client leaf certs, not just the CA. A CA-only PEM truststore worked for the pure-mTLS endpoint but the EXTERNAL endpoint rejected the handshake withtlsv1.3 alert certificate unknown. Matches Infinispan's own harness (CertificateAuthority.exportCertificatesstores each leaf). Fix: the committed truststore is a leaf + CA bundle — the leaf satisfies the realm, the CA lets the pure-mTLS trust manager validate the chain.SSL_connect()succeeds; thecertificate requiredalert arrives on the first op. The no-cert test asserts an exception across connect()+op, not at connect().Authoritative references (per
AGENTS.md)Infinispan server tests
AuthenticationCertIT+security/trustrealm.xml+endpoints/auth-tls-external.xml, and the 16.0 server XSD.Testing
Builds clean under Release
-Werror. 284 unit + 107 integration (23 suites);Auth/Tls/MutualTls/ExternalAuthsuites verified locally (7/5/3/2 pass).OAUTHBEARER integration remains deferred (needs a token issuer/realm) and is tracked separately.
Closes #24
🤖 Generated with Claude Code