File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
src/main/kotlin/com/cosmotech/api Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ data class CsmPlatformProperties(
4646 /* * Argo Service */
4747 val argo : Argo ,
4848
49+ val tls : TlsConfig = TlsConfig (),
50+
4951 /* * Cosmo Tech core images */
5052 val images : CsmImages ,
5153
@@ -395,9 +397,6 @@ data class CsmPlatformProperties(
395397 /* * Twin cache port */
396398 val port : String = " 6379" ,
397399
398- /* * Twin cache tls enabled */
399- val tls : CsmTwinCacheTLS = CsmTwinCacheTLS (),
400-
401400 /* * Twin cache user */
402401 val username : String = " default" ,
403402
@@ -434,10 +433,6 @@ data class CsmPlatformProperties(
434433 /* * Twin cache query page information for solution */
435434 val solution : PageSizing = PageSizing (),
436435 ) {
437- data class CsmTwinCacheTLS (
438- val enabled : Boolean = false ,
439- val bundle : String? = null ,
440- )
441436
442437 data class PageSizing (
443438 /* * Max result for a single page */
@@ -459,4 +454,6 @@ data class CsmPlatformProperties(
459454 val workspaces : List <String > = emptyList(),
460455 )
461456 }
457+
458+ data class TlsConfig (val enabled : Boolean = false , val bundle : String = " " )
462459}
Original file line number Diff line number Diff line change @@ -20,26 +20,26 @@ open class RedisConfig {
2020 @Value(" \$ {spring.data.redis.port}" ) private lateinit var twincachePort: String
2121
2222 // This property path is not compatible with spring.data.redis used by redis-om auto configuration
23- @Value(" \$ {csm.platform.twincache. tls.enabled}" ) private var twincacheTLS : Boolean = false
23+ @Value(" \$ {csm.platform.tls.enabled}" ) private val tlsEnabled : Boolean = false
2424
2525 // This property path is not compatible with spring.data.redis used by redis-om auto configuration
2626 // It is duplicated since spring.data.redis.ssl.bundle cannot be empty
27- @Value(" \$ {csm.platform.tls.bundle}" ) private var customTLSBundle : String = " "
27+ @Value(" \$ {csm.platform.tls.bundle}" ) private var tlsBundle : String = " "
2828
2929 @Value(" \$ {spring.data.redis.password}" ) private lateinit var twincachePassword: String
3030
3131 @Bean
3232 open fun csmJedisClientConfig (sslBundles : SslBundles ): JedisClientConfig {
33- return if (twincacheTLS && customTLSBundle .isNotBlank()) {
33+ return if (tlsEnabled && tlsBundle .isNotBlank()) {
3434 DefaultJedisClientConfig .builder()
35- .ssl(twincacheTLS )
36- .sslSocketFactory(sslBundles.getBundle(customTLSBundle ).createSslContext().socketFactory)
35+ .ssl(tlsEnabled )
36+ .sslSocketFactory(sslBundles.getBundle(tlsBundle ).createSslContext().socketFactory)
3737 .password(twincachePassword)
3838 .timeoutMillis(Protocol .DEFAULT_TIMEOUT )
3939 .build()
4040 } else {
4141 DefaultJedisClientConfig .builder()
42- .ssl(twincacheTLS )
42+ .ssl(tlsEnabled )
4343 .password(twincachePassword)
4444 .timeoutMillis(Protocol .DEFAULT_TIMEOUT )
4545 .build()
You can’t perform that action at this time.
0 commit comments