- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for IsAccessKeyValid (0.2 sec)
-
internal/auth/credentials.go
// ContainsReservedChars - returns whether the input string contains reserved characters. func ContainsReservedChars(s string) bool { return strings.ContainsAny(s, reservedChars) } // IsAccessKeyValid - validate access key for right length. func IsAccessKeyValid(accessKey string) bool { return len(accessKey) >= accessKeyMinLen } // IsSecretKeyValid - validate secret key for right length. func IsSecretKeyValid(secretKey string) bool {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
cmd/signature-v4-parser.go
if len(credElements) < 5 { return ch, ErrCredMalformed } accessKey := strings.Join(credElements[:len(credElements)-4], SlashSeparator) // The access key may contain one or more `/` if !auth.IsAccessKeyValid(accessKey) { return ch, ErrInvalidAccessKeyID } // Save access key id. cred := credentialHeader{ accessKey: accessKey, } credElements = credElements[len(credElements)-4:] var e error
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.4K bytes - Viewed (0) -
internal/auth/credentials_test.go
}{ {alphaNumericTable[:accessKeyMinLen], true}, {alphaNumericTable[:accessKeyMinLen+1], true}, {alphaNumericTable[:accessKeyMinLen-1], false}, } for i, testCase := range testCases { result := IsAccessKeyValid(testCase.accessKey) if result != testCase.expectedResult { t.Fatalf("test %v: expected: %v, got: %v", i+1, testCase.expectedResult, result) } } } func TestIsSecretKeyValid(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Mar 01 21:09:42 UTC 2024 - 5.4K bytes - Viewed (0) -
cmd/batch-replicate.go
return c.AccessKey == "" && c.SecretKey == "" && c.SessionToken == "" } // Validate validates if credentials are valid func (c BatchJobReplicateCredentials) Validate() error { if !auth.IsAccessKeyValid(c.AccessKey) || !auth.IsSecretKeyValid(c.SecretKey) { return errInvalidArgument } return nil } // BatchJobReplicateTarget describes target element of the replication job that receives
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 01 12:53:30 UTC 2024 - 6.3K bytes - Viewed (0) -
cmd/iam.go
if !sys.Initialized() { return updatedAt, errServerNotInitialized } if !auth.IsAccessKeyValid(accessKey) { return updatedAt, auth.ErrInvalidAccessKeyLength } if auth.ContainsReservedChars(accessKey) { return updatedAt, auth.ErrContainsReservedChars }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0)