fix: partially defined cred env vars cause "minio gateway s3" to fail (#12228)

Both credential env vars not needed to start s3 gateway
This commit is contained in:
ebozduman
2021-06-10 22:28:09 -07:00
committed by GitHub
parent f2a3872301
commit b154581b65
3 changed files with 70 additions and 14 deletions

View File

@@ -133,10 +133,28 @@ var (
`Access key length should be at least 3, and secret key length at least 8 characters`,
)
ErrEnvCredentialsMissingGateway = newErrFn(
"Credentials missing",
"Please set your credentials in the environment",
`In Gateway mode, access and secret keys should be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`,
ErrMissingEnvCredentialRootUser = newErrFn(
"Missing credential environment variable, \""+EnvRootUser+"\"",
"Environment variable \""+EnvRootUser+"\" is missing",
`Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`,
)
ErrMissingEnvCredentialRootPassword = newErrFn(
"Missing credential environment variable, \""+EnvRootPassword+"\"",
"Environment variable \""+EnvRootPassword+"\" is missing",
`Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`,
)
ErrMissingEnvCredentialAccessKey = newErrFn(
"Missing credential environment variable, \""+EnvAccessKey+"\"",
"Environment variables \""+EnvAccessKey+"\" and \""+EnvSecretKey+"\" are deprecated",
`Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`,
)
ErrMissingEnvCredentialSecretKey = newErrFn(
"Missing credential environment variable, \""+EnvSecretKey+"\"",
"Environment variables \""+EnvSecretKey+"\" and \""+EnvAccessKey+"\" are deprecated",
`Root user name (access key) and root password (secret key) are expected to be specified via environment variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD respectively`,
)
ErrInvalidErasureEndpoints = newErrFn(