|
|
@ -182,19 +182,19 @@ func newS3(url string) (*miniogo.Core, error) { |
|
|
|
|
|
|
|
|
|
|
|
// Chains all credential types, in the following order:
|
|
|
|
// Chains all credential types, in the following order:
|
|
|
|
// - AWS env vars (i.e. AWS_ACCESS_KEY_ID)
|
|
|
|
// - AWS env vars (i.e. AWS_ACCESS_KEY_ID)
|
|
|
|
|
|
|
|
// - AWS creds file (i.e. AWS_SHARED_CREDENTIALS_FILE or ~/.aws/credentials)
|
|
|
|
// - IAM profile based credentials. (performs an HTTP
|
|
|
|
// - IAM profile based credentials. (performs an HTTP
|
|
|
|
// call to a pre-defined endpoint, only valid inside
|
|
|
|
// call to a pre-defined endpoint, only valid inside
|
|
|
|
// configured ec2 instances)
|
|
|
|
// configured ec2 instances)
|
|
|
|
// - AWS creds file (i.e. AWS_SHARED_CREDENTIALS_FILE or ~/.aws/credentials)
|
|
|
|
|
|
|
|
// - Static credentials provided by user (i.e. MINIO_ACCESS_KEY)
|
|
|
|
// - Static credentials provided by user (i.e. MINIO_ACCESS_KEY)
|
|
|
|
creds := credentials.NewChainCredentials([]credentials.Provider{ |
|
|
|
creds := credentials.NewChainCredentials([]credentials.Provider{ |
|
|
|
&credentials.EnvAWS{}, |
|
|
|
&credentials.EnvAWS{}, |
|
|
|
|
|
|
|
&credentials.FileAWSCredentials{}, |
|
|
|
&credentials.IAM{ |
|
|
|
&credentials.IAM{ |
|
|
|
Client: &http.Client{ |
|
|
|
Client: &http.Client{ |
|
|
|
Transport: minio.NewCustomHTTPTransport(), |
|
|
|
Transport: minio.NewCustomHTTPTransport(), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
&credentials.FileAWSCredentials{}, |
|
|
|
|
|
|
|
&credentials.EnvMinio{}, |
|
|
|
&credentials.EnvMinio{}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|