From 715291531848f60577bb5497b6cbd84c3c02662c Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Thu, 18 Nov 2021 22:32:33 +0530 Subject: [PATCH] Use pointer based TLS field (#13659) This will help other projects like `health-analyzer` to verify that the struct was indeed populated by the minio server, and is not default-populated during unmarshalling of the JSON. Signed-off-by: Shireesh Anjal --- cmd/admin-handlers.go | 3 ++- go.mod | 5 +++-- go.sum | 10 +++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 5c70d5a31..159ff16f7 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1835,6 +1835,7 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque }) } + tls := getTLSInfo() healthInfo.Minio.Info = madmin.MinioInfo{ Mode: infoMessage.Mode, Domain: infoMessage.Domain, @@ -1847,7 +1848,7 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque Services: infoMessage.Services, Backend: infoMessage.Backend, Servers: servers, - TLS: getTLSInfo(), + TLS: &tls, } partialWrite(healthInfo) } diff --git a/go.mod b/go.mod index 54b4a761b..d00c79535 100644 --- a/go.mod +++ b/go.mod @@ -48,8 +48,9 @@ require ( github.com/minio/csvparser v1.0.0 github.com/minio/highwayhash v1.0.2 github.com/minio/kes v0.14.0 - github.com/minio/madmin-go v1.1.12 - github.com/minio/minio-go/v7 v7.0.15 + github.com/minio/madmin-go v1.1.15 + github.com/minio/mc v0.0.0-20211115052100-7fd441ec6c5b // indirect + github.com/minio/minio-go/v7 v7.0.16-0.20211108161804-a7a36ee131df github.com/minio/parquet-go v1.1.0 github.com/minio/pkg v1.1.7 github.com/minio/selfupdate v0.3.1 diff --git a/go.sum b/go.sum index 44b866420..0d7e987a4 100644 --- a/go.sum +++ b/go.sum @@ -1085,18 +1085,22 @@ github.com/minio/kes v0.14.0 h1:plCGm4LwR++T1P1sXsJbyFRX54CE1WRuo9PAPj6MC3Q= github.com/minio/kes v0.14.0/go.mod h1:OUensXz2BpgMfiogslKxv7Anyx/wj+6bFC6qA7BQcfA= github.com/minio/madmin-go v1.0.12/go.mod h1:BK+z4XRx7Y1v8SFWXsuLNqQqnq5BO/axJ8IDJfgyvfs= github.com/minio/madmin-go v1.1.11-0.20211102182201-e51fd3d6b104/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= -github.com/minio/madmin-go v1.1.12 h1:dtSPkOlzDa1Z2dnw9VQL0+OVVl+7O23o2lfztWs0Dqc= github.com/minio/madmin-go v1.1.12/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= -github.com/minio/mc v0.0.0-20211110003602-1461b652d920 h1:3QhH/Ji1X6OsoQFkebmsU0D2R86bSpqm567xzWM7WtY= +github.com/minio/madmin-go v1.1.13/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= +github.com/minio/madmin-go v1.1.15 h1:iRfHD3xTMGjJ6EZvLQbcxog2nfXUXZ1yp283xGvuvbM= +github.com/minio/madmin-go v1.1.15/go.mod h1:Iu0OnrMWNBYx1lqJTW+BFjBMx0Hi0wjw8VmqhiOs2Jo= github.com/minio/mc v0.0.0-20211110003602-1461b652d920/go.mod h1:V8NmUfU0W3G/mrifeO6nm4CWFTiXY2nx7FJyMge/aHk= +github.com/minio/mc v0.0.0-20211115052100-7fd441ec6c5b h1:crCI2lSbzWzMuk/U6fMqSl5eF2V2VKDFNX+ILSD1sxU= +github.com/minio/mc v0.0.0-20211115052100-7fd441ec6c5b/go.mod h1:2fFAzMBmEYcN4mjcmQdlLuSabP+bvQC5UpqfLzRgrQQ= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= github.com/minio/minio-go/v7 v7.0.11-0.20210302210017-6ae69c73ce78/go.mod h1:mTh2uJuAbEqdhMVl6CMIIZLUeiMiWtJR4JB8/5g2skw= github.com/minio/minio-go/v7 v7.0.15-0.20211004160302-3b57c1e369ca/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g= -github.com/minio/minio-go/v7 v7.0.15 h1:r9/NhjJ+nXYrIYvbObhvc1wPj3YH1iDpJzz61uRKLyY= github.com/minio/minio-go/v7 v7.0.15/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g= +github.com/minio/minio-go/v7 v7.0.16-0.20211108161804-a7a36ee131df h1:7BfpVODGh5reCjIx2lUqE7CxRMjo58XJw7ZjKKNW/vc= +github.com/minio/minio-go/v7 v7.0.16-0.20211108161804-a7a36ee131df/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g= github.com/minio/operator v0.0.0-20211011212245-31460bbbc4b7 h1:dkfuMNslMjGoJ4ArAMSoQhidYNdm3SgzLBP+f96O3/E= github.com/minio/operator v0.0.0-20211011212245-31460bbbc4b7/go.mod h1:lDpuz8nwsfhKlfiBaA3Z8AW019fWEAjO2gltfLbdorE= github.com/minio/operator/logsearchapi v0.0.0-20211011212245-31460bbbc4b7 h1:vFtQqCt67ETp0JAkOKRWTKkgwFv14Vc1jJSxmQ8wJE0=