mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -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
|
secretKey string
|
||||||
expectedErr error
|
expectedErr error
|
||||||
}{
|
}{
|
||||||
// Access key (less than 5 chrs) too small.
|
// Access key (less than 3 chrs) too small.
|
||||||
{"user", cred.SecretKey, auth.ErrInvalidAccessKeyLength},
|
{"u1", cred.SecretKey, auth.ErrInvalidAccessKeyLength},
|
||||||
// Secret key (less than 8 chrs) too small.
|
// Secret key (less than 8 chrs) too small.
|
||||||
{cred.AccessKey, "pass", auth.ErrInvalidSecretKeyLength},
|
{cred.AccessKey, "pass", auth.ErrInvalidSecretKeyLength},
|
||||||
// Authentication error.
|
// Authentication error.
|
||||||
|
@ -53,7 +53,7 @@ FLAGS:
|
|||||||
{{end}}{{end}}
|
{{end}}{{end}}
|
||||||
ENVIRONMENT VARIABLES:
|
ENVIRONMENT VARIABLES:
|
||||||
ACCESS:
|
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.
|
MINIO_SECRET_KEY: Custom password or secret key of minimum 8 characters in length.
|
||||||
|
|
||||||
BROWSER:
|
BROWSER:
|
||||||
|
@ -116,10 +116,10 @@ func TestParseCredentialHeader(t *testing.T) {
|
|||||||
expectedErrCode: ErrCredMalformed,
|
expectedErrCode: ErrCredMalformed,
|
||||||
},
|
},
|
||||||
// Test Case - 4.
|
// Test Case - 4.
|
||||||
// Test case with AccessKey of length 4.
|
// Test case with AccessKey of length 2.
|
||||||
{
|
{
|
||||||
inputCredentialStr: generateCredentialStr(
|
inputCredentialStr: generateCredentialStr(
|
||||||
"^#@.",
|
"^#",
|
||||||
UTCNow().Format(yyyymmdd),
|
UTCNow().Format(yyyymmdd),
|
||||||
"ABCD",
|
"ABCD",
|
||||||
"ABCD",
|
"ABCD",
|
||||||
|
@ -34,7 +34,7 @@ $ tree ~/.minio
|
|||||||
|Field|Type|Description|
|
|Field|Type|Description|
|
||||||
|:---|:---|:---|
|
|:---|:---|:---|
|
||||||
|``credential``| | Auth credential for object storage and web access.|
|
|``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.|
|
|``credential.secretKey`` | _string_ | Secret key of minimum 8 characters in length. You may override this field with `MINIO_SECRET_KEY` environment variable.|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Minimum length for Minio access key.
|
// Minimum length for Minio access key.
|
||||||
accessKeyMinLen = 5
|
accessKeyMinLen = 3
|
||||||
|
|
||||||
// Maximum length for Minio access key.
|
// Maximum length for Minio access key.
|
||||||
// There is no max length enforcement for access keys
|
// There is no max length enforcement for access keys
|
||||||
|
Loading…
Reference in New Issue
Block a user