From 419dc95120394c1b3d17526bcccf0601e99352d4 Mon Sep 17 00:00:00 2001 From: Indukuri Date: Wed, 28 Jun 2023 16:58:37 +0530 Subject: [PATCH] Code changes to pass insecure flag from csi-unity This commit contains changes needed to pass skipCertificateValidation flag from secrets file via configConnect object from csi-unity to goUnity so that the same can be leveraged during authentication retry when we hit 401 issue due to sessionIdleTimeout in STIG mode --- go.mod | 2 +- go.sum | 4 ++++ service/service.go | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index abc3ec5..69dc08b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/dell/gocsi v1.7.0 github.com/dell/gofsutil v1.12.0 github.com/dell/goiscsi v1.7.0 - github.com/dell/gounity v1.14.0 + github.com/dell/gounity v1.14.1-0.20230630050209-170fa6aff515 github.com/fsnotify/fsnotify v1.4.9 github.com/golang/protobuf v1.5.3 github.com/kubernetes-csi/csi-lib-utils v0.7.0 diff --git a/go.sum b/go.sum index 8921c0f..2ddafce 100644 --- a/go.sum +++ b/go.sum @@ -103,6 +103,10 @@ github.com/dell/gonvme v1.4.0 h1:SK94ETt0pYZbaKkRJOcq81TbrzC38ufBX+w4uKwJnks= github.com/dell/gonvme v1.4.0/go.mod h1:fIu54BDTyIu8JOTXo6Q0BqMF1tOjpO+wKXVXjLReR2o= github.com/dell/gounity v1.14.0 h1:FAMmt0rh9ARoOJfJIreo+4Zty7cI1y4aO3EuzNDI+5o= github.com/dell/gounity v1.14.0/go.mod h1:/HEDZZ+yKH/cWbEXvOrHqy+90eFuPZei+gUskZ9IvKk= +github.com/dell/gounity v1.14.1-0.20230519092830-2b5b5f2276eb h1:fBfl5w5HUEMqQDmdx+6Kc+vr2KF0lJ+6lmLS7L0J9No= +github.com/dell/gounity v1.14.1-0.20230519092830-2b5b5f2276eb/go.mod h1:/HEDZZ+yKH/cWbEXvOrHqy+90eFuPZei+gUskZ9IvKk= +github.com/dell/gounity v1.14.1-0.20230630050209-170fa6aff515 h1:vYUjVH0xrx3wEQZfO+XqRmwgSIpcOuXhhd4ZzE9A3kI= +github.com/dell/gounity v1.14.1-0.20230630050209-170fa6aff515/go.mod h1:/HEDZZ+yKH/cWbEXvOrHqy+90eFuPZei+gUskZ9IvKk= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= diff --git a/service/service.go b/service/service.go index 65059f6..5a2dd88 100644 --- a/service/service.go +++ b/service/service.go @@ -783,6 +783,7 @@ func singleArrayProbe(ctx context.Context, probeType string, array *StorageArray Endpoint: array.Endpoint, Username: array.Username, Password: array.Password, + Insecure: *array.SkipCertificateValidation, }) if err != nil { log.Errorf("Unity authentication failed for array %s error: %v", array.ArrayID, err)