mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
madmin: Do not require SSL to set credentials (#3879)
We need to relax this requirement and let the client decides if it can allow to set credentials API over plain connection.
This commit is contained in:
parent
03937e7554
commit
d602495600
@ -20,7 +20,6 @@ package madmin
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"errors"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
@ -34,11 +33,6 @@ type setCredsReq struct {
|
|||||||
// SetCredentials - Call Set Credentials API to set new access and secret keys in the specified Minio server
|
// SetCredentials - Call Set Credentials API to set new access and secret keys in the specified Minio server
|
||||||
func (adm *AdminClient) SetCredentials(access, secret string) error {
|
func (adm *AdminClient) SetCredentials(access, secret string) error {
|
||||||
|
|
||||||
// Disallow sending with the server if the connection is not secure
|
|
||||||
if !adm.secure {
|
|
||||||
return errors.New("setting new credentials requires HTTPS connection to the server")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup new request
|
// Setup new request
|
||||||
reqData := requestData{}
|
reqData := requestData{}
|
||||||
reqData.queryValues = make(url.Values)
|
reqData.queryValues = make(url.Values)
|
||||||
|
Loading…
Reference in New Issue
Block a user