You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
ErrInvalidProof=errAPI.Code("invalid_proof").StatusError("invalid proof provided for credential", http.StatusUnauthorized)
23
-
ErrAWSAccountMismatch=errAPI.Code("aws_account_mismatch").StatusError("the AWS Account ID in the role ARN does not match the AWS Account ID of the AWS credentials used for authentication. Make sure you are using AWS credentials that correspond to the role you are trying to add.", http.StatusUnauthorized)
24
-
ErrAWSAuthFailed=errAPI.Code("aws_auth_failed").StatusError("authentication not accepted by AWS", http.StatusUnauthorized)
25
-
ErrAWSKMSKeyNotFound=errAPI.Code("aws_kms_key_not_found").StatusError("could not found the KMS key", http.StatusNotFound)
26
-
ErrInvalidRoleARN=errAPI.Code("invalid_role_arn").StatusError("provided role is not a valid ARN", http.StatusBadRequest)
27
-
ErrMissingMetadata=errAPI.Code("missing_metadata").StatusErrorPref("expecting %s metadata provided for credentials of type %s", http.StatusBadRequest)
28
-
ErrInvalidMetadataKey=errAPI.Code("invalid_metadata_key").StatusErrorPref("invalid metadata key %s for credential type %s", http.StatusBadRequest)
ErrRoleDoesNotMatch=errAPI.Code("role_does_not_match").StatusError("role in metadata does not match the verifier", http.StatusBadRequest)
19
+
ErrInvalidFingerprint=errAPI.Code("invalid_fingerprint").StatusError("fingerprint is invalid", http.StatusBadRequest)
20
+
ErrTooShortFingerprint=errAPI.Code("too_short_fingerprint").StatusErrorf("at least %d characters of the fingerprint must be entered", http.StatusBadRequest, ShortCredentialFingerprintMinimumLength)
21
+
ErrCredentialFingerprintNotUnique=errAPI.Code("fingerprint_not_unique").StatusErrorf("there are multiple credentials that start with the given fingerprint. Please use the full fingerprint", http.StatusConflict)
22
+
ErrInvalidVerifier=errAPI.Code("invalid_verifier").StatusError("verifier is invalid", http.StatusBadRequest)
23
+
ErrInvalidCredentialType=errAPI.Code("invalid_credential_type").StatusError("credential type is invalid", http.StatusBadRequest)
24
+
ErrInvalidCredentialDescription=errAPI.Code("invalid_credential_description").StatusError("credential description can be at most 32 characters long", http.StatusBadRequest)
ErrInvalidProof=errAPI.Code("invalid_proof").StatusError("invalid proof provided for credential", http.StatusUnauthorized)
27
+
ErrAWSAccountMismatch=errAPI.Code("aws_account_mismatch").StatusError("the AWS Account ID in the role ARN does not match the AWS Account ID of the AWS credentials used for authentication. Make sure you are using AWS credentials that correspond to the role you are trying to add.", http.StatusUnauthorized)
28
+
ErrAWSAuthFailed=errAPI.Code("aws_auth_failed").StatusError("authentication not accepted by AWS", http.StatusUnauthorized)
29
+
ErrAWSKMSKeyNotFound=errAPI.Code("aws_kms_key_not_found").StatusError("could not found the KMS key", http.StatusNotFound)
30
+
ErrInvalidRoleARN=errAPI.Code("invalid_role_arn").StatusError("provided role is not a valid ARN", http.StatusBadRequest)
31
+
ErrMissingMetadata=errAPI.Code("missing_metadata").StatusErrorPref("expecting %s metadata provided for credentials of type %s", http.StatusBadRequest)
32
+
ErrInvalidMetadataKey=errAPI.Code("invalid_metadata_key").StatusErrorPref("invalid metadata key %s for credential type %s", http.StatusBadRequest)
ErrRoleDoesNotMatch=errAPI.Code("role_does_not_match").StatusError("role in metadata does not match the verifier", http.StatusBadRequest)
35
+
ErrCannotDisableCurrentCredential=errAPI.Code("cannot_disable_current_credential").StatusError("cannot disable the credential that is currently used on this device", http.StatusConflict)
31
36
)
32
37
33
38
// Credential metadata keys
@@ -36,24 +41,30 @@ const (
36
41
CredentialMetadataAWSRole="aws_role"
37
42
)
38
43
44
+
const (
45
+
ShortCredentialFingerprintMinimumLength=10
46
+
)
47
+
39
48
// Credential is used to authenticate to the API and to encrypt the account key.
0 commit comments