- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for IsSecretKeyValid (0.09 sec)
-
internal/auth/credentials.go
} // 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 { return len(secretKey) >= secretKeyMinLen } // Default access and secret keys. const ( DefaultAccessKey = "minioadmin" DefaultSecretKey = "minioadmin"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
internal/auth/credentials_test.go
}{ {alphaNumericTable[:secretKeyMinLen], true}, {alphaNumericTable[:secretKeyMinLen+1], true}, {alphaNumericTable[:secretKeyMinLen-1], false}, } for i, testCase := range testCases { result := IsSecretKeyValid(testCase.secretKey) if result != testCase.expectedResult { t.Fatalf("test %v: expected: %v, got: %v", i+1, testCase.expectedResult, result) } } } func TestGetNewCredentials(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
} // 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 // the filtered data from source
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
return updatedAt, auth.ErrInvalidAccessKeyLength } if auth.ContainsReservedChars(accessKey) { return updatedAt, auth.ErrContainsReservedChars } if !auth.IsSecretKeyValid(ureq.SecretKey) { return updatedAt, auth.ErrInvalidSecretKeyLength } updatedAt, err = sys.store.AddUser(ctx, accessKey, ureq) if err != nil { return updatedAt, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
cmd/iam-store.go
if !ok || !ui.Credentials.IsServiceAccount() { return updatedAt, errNoSuchServiceAccount } cr := ui.Credentials currentSecretKey := cr.SecretKey if opts.secretKey != "" { if !auth.IsSecretKeyValid(opts.secretKey) { return updatedAt, auth.ErrInvalidSecretKeyLength } cr.SecretKey = opts.secretKey } if opts.name != "" { cr.Name = opts.name }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 14 16:35:37 UTC 2024 - 83.2K bytes - Viewed (0)