Support Usage API talk to MinIO over TLS with Insecure (#241)
* Support Usage API talk to MinIO over TLS with Insecure Right now if MinIO is running with TLS, and the certificate is not trusted by console, we fail usage requests. We need to leverage the support for insecure connections so we can read Health Checks and Usage information. * Remove unusd import
This commit is contained in:
@@ -54,7 +54,8 @@ func NewAdminClientWithInsecure(url, accessKey, secretKey string, insecure bool)
|
||||
if err != nil {
|
||||
return nil, err.Trace(url)
|
||||
}
|
||||
s3Client.SetCustomTransport(STSClient.Transport)
|
||||
stsClient := PrepareSTSClient(insecure)
|
||||
s3Client.SetCustomTransport(stsClient.Transport)
|
||||
return s3Client, nil
|
||||
}
|
||||
|
||||
@@ -266,7 +267,8 @@ func newAdminFromClaims(claims *models.Principal) (*madmin.AdminClient, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
adminClient.SetCustomTransport(STSClient.Transport)
|
||||
stsClient := PrepareSTSClient(false)
|
||||
adminClient.SetCustomTransport(stsClient.Transport)
|
||||
return adminClient, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user