mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
tier: Allow edit of the new Azure and AWS auth params (#18690)
Allow editing for the service principal credentials from Azure and the web identity token for AWS; Also, more validation of input parameters.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
@@ -35,6 +36,15 @@ type warmBackendMinIO struct {
|
||||
var _ WarmBackend = (*warmBackendMinIO)(nil)
|
||||
|
||||
func newWarmBackendMinIO(conf madmin.TierMinIO, tier string) (*warmBackendMinIO, error) {
|
||||
// Validation of credentials
|
||||
if conf.AccessKey == "" || conf.SecretKey == "" {
|
||||
return nil, errors.New("both access and secret keys are requied")
|
||||
}
|
||||
|
||||
if conf.Bucket == "" {
|
||||
return nil, errors.New("no bucket name was provided")
|
||||
}
|
||||
|
||||
u, err := url.Parse(conf.Endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user