Enforce signature v4 tests all the time, server defaults to only authenticated requests.

All requests must be authenticated to minio server from now on by using keys generated at
``${HOME}/.minio/users.json`` - from ``minio controller`` during its first time run.

Add a new hidden option ``--anonymous`` for running server in unauthenticated mode.
This commit is contained in:
Harshavardhana
2015-10-06 23:32:20 -07:00
parent 00b0f2e0d4
commit ee377c9bff
11 changed files with 356 additions and 1186 deletions

View File

@@ -130,8 +130,8 @@ func startTM(api API) {
// startServer starts an s3 compatible cloud storage server
func startServer(conf minioConfig) *probe.Error {
minioAPI := getNewAPI()
apiHandler := getAPIHandler(minioAPI)
minioAPI := getNewAPI(conf.Anonymous)
apiHandler := getAPIHandler(conf.Anonymous, minioAPI)
apiServer, err := configureAPIServer(conf, apiHandler)
if err != nil {
return err.Trace()
@@ -156,6 +156,7 @@ func getServerConfig(c *cli.Context) minioConfig {
return minioConfig{
Address: c.GlobalString("address"),
RPCAddress: c.GlobalString("address-server-rpc"),
Anonymous: c.GlobalBool("anonymous"),
TLS: tls,
CertFile: certFile,
KeyFile: keyFile,