mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Reduce Minio access key minimum length to 3 (#5478)
This is a generic minimum value. The current reason is to support Azure blob storage accounts name whose length is less than 5. 3 is the minimum length for Azure.
This commit is contained in:
parent
2afd196c83
commit
da2faa19a1
@ -39,8 +39,8 @@ func testAuthenticate(authType string, t *testing.T) {
|
||||
secretKey string
|
||||
expectedErr error
|
||||
}{
|
||||
// Access key (less than 5 chrs) too small.
|
||||
{"user", cred.SecretKey, auth.ErrInvalidAccessKeyLength},
|
||||
// Access key (less than 3 chrs) too small.
|
||||
{"u1", cred.SecretKey, auth.ErrInvalidAccessKeyLength},
|
||||
// Secret key (less than 8 chrs) too small.
|
||||
{cred.AccessKey, "pass", auth.ErrInvalidSecretKeyLength},
|
||||
// Authentication error.
|
||||
|
@ -53,7 +53,7 @@ FLAGS:
|
||||
{{end}}{{end}}
|
||||
ENVIRONMENT VARIABLES:
|
||||
ACCESS:
|
||||
MINIO_ACCESS_KEY: Custom username or access key of minimum 5 characters in length.
|
||||
MINIO_ACCESS_KEY: Custom username or access key of minimum 3 characters in length.
|
||||
MINIO_SECRET_KEY: Custom password or secret key of minimum 8 characters in length.
|
||||
|
||||
BROWSER:
|
||||
|
@ -116,10 +116,10 @@ func TestParseCredentialHeader(t *testing.T) {
|
||||
expectedErrCode: ErrCredMalformed,
|
||||
},
|
||||
// Test Case - 4.
|
||||
// Test case with AccessKey of length 4.
|
||||
// Test case with AccessKey of length 2.
|
||||
{
|
||||
inputCredentialStr: generateCredentialStr(
|
||||
"^#@.",
|
||||
"^#",
|
||||
UTCNow().Format(yyyymmdd),
|
||||
"ABCD",
|
||||
"ABCD",
|
||||
|
@ -34,7 +34,7 @@ $ tree ~/.minio
|
||||
|Field|Type|Description|
|
||||
|:---|:---|:---|
|
||||
|``credential``| | Auth credential for object storage and web access.|
|
||||
|``credential.accessKey`` | _string_ | Access key of minimum 5 characters in length. You may override this field with `MINIO_ACCESS_KEY` environment variable.|
|
||||
|``credential.accessKey`` | _string_ | Access key of minimum 3 characters in length. You may override this field with `MINIO_ACCESS_KEY` environment variable.|
|
||||
|``credential.secretKey`` | _string_ | Secret key of minimum 8 characters in length. You may override this field with `MINIO_SECRET_KEY` environment variable.|
|
||||
|
||||
Example:
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
|
||||
const (
|
||||
// Minimum length for Minio access key.
|
||||
accessKeyMinLen = 5
|
||||
accessKeyMinLen = 3
|
||||
|
||||
// Maximum length for Minio access key.
|
||||
// There is no max length enforcement for access keys
|
||||
|
Loading…
Reference in New Issue
Block a user