You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added SSL Option
* Passed tests
* Implemented SSL Support
* Implemented SSL Support
* Implemented SSL Support
* Revert go.mod and go.sum
* Revert go.mod and go.sum
* Golint fix
* Golint fix
* Govet fix
* reduce wait time, revert container place and removed WithTLS options
* Added SSL With option
* Added SSL With option
* Devide Run function n sub function to reduce complexity
* make Options private
* removed setupTls function and moved to WithSSL Options
* Fix Sec warning InsecureSkipVerify
* Fix lint
* added cassandra ssl option
* removed InsecureSkipVerify variable
* added mising docs and modify TlsConfig method
* doc changes
---------
Co-authored-by: Mitul Shah <mitul.shah@zoodmall.com>
Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
Copy file name to clipboardExpand all lines: docs/modules/cassandra.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,24 @@ In the case you have a custom config file for Cassandra, it's possible to copy t
70
70
!!!warning
71
71
You should provide a valid Cassandra configuration file, otherwise the container will fail to start.
72
72
73
+
#### WithTLS
74
+
75
+
- Not available until the next release <a href="https://github.com/testcontainers/testcontainers-go"><span class="tc-version">:material-tag: main</span></a>
76
+
77
+
If you need to enable TLS/SSL encryption for client connections, you can use the `cassandra.WithTLS()` option.
78
+
79
+
When enabled, the container will:
80
+
- Generate self-signed certificates automatically
81
+
- Configure Cassandra to use client encryption
82
+
- Expose the SSL port (9142)
83
+
84
+
Use the `TLSConfig()` method on the returned container to get the `*tls.Config` for client connections. The method returns an error if TLS was not enabled via `WithTLS()`.
85
+
86
+
<!--codeinclude-->
87
+
[Creating a Cassandra container with TLS](../../modules/cassandra/examples_test.go) inside_block:runCassandraContainerWithTLS
- Not available until the next release <a href="https://github.com/testcontainers/testcontainers-go"><span class="tc-version">:material-tag: main</span></a>
110
+
111
+
This method returns the TLS configuration for secure connections to the Cassandra container. It can only be used when the container was created with the `WithTLS()` option. Returns an errorifTLS was not enabled.
0 commit comments