Skip to content

Commit

Permalink
Fix IP SAN issue with tls (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
george-zubrienko authored Feb 26, 2025
1 parent 9bfad58 commit 2bcd4c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/checkpoint/request/cql_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/scylladb/gocqlx/v3"
"io"
"k8s.io/klog/v2"
"strconv"
)

type CqlStore struct {
Expand Down Expand Up @@ -80,7 +81,7 @@ func NewAstraCqlStoreConfig(logger klog.Logger, config *AstraBundleConfig) *Astr

caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(bundleFiles["ca.crt"])
var gatewayConfig map[string]string
var gatewayConfig map[string]any

err = json.Unmarshal(bundleFiles["config.json"], &gatewayConfig)
if err != nil {
Expand All @@ -89,13 +90,14 @@ func NewAstraCqlStoreConfig(logger klog.Logger, config *AstraBundleConfig) *Astr
}

return &AstraCqlStoreConfig{
GatewayHost: gatewayConfig["host"],
GatewayPort: gatewayConfig["cql_port"],
GatewayHost: gatewayConfig["host"].(string),
GatewayPort: strconv.Itoa(int(gatewayConfig["cql_port"].(float64))),
GatewayPass: config.GatewayPassword,
GatewayUser: config.GatewayUser,
TlsConfig: &tls.Config{
Certificates: []tls.Certificate{cert},
RootCAs: caCertPool,
ServerName: gatewayConfig["host"].(string),
},
}

Expand Down

0 comments on commit 2bcd4c5

Please sign in to comment.