This PR also simplifies the token and access key validation across our signature handling.
Showing the changes to cmd/api-errors.go (1 of 9 files). Show all
Unified · Split
| @@ -150,6 +150,9 @@ const ( · 149 unmodified lines | ||
| 150 | 150 | ErrKMSNotConfigured |
| 151 | 151 | ErrKMSAuthFailure |
| 152 | 152 | |
| 153 | + ErrNoAccessKey | |
| 154 | + ErrInvalidToken | |
| 155 | + | |
| 153 | 156 | // Bucket notification related errors. |
| 154 | 157 | ErrEventNotification |
| 155 | 158 | ErrARNNotification |
| @@ -806,6 +809,16 @@ var errorCodeResponse = map[APIErrorCode]APIError{ · 650 unmodified lines | ||
| 806 | 809 | Description: "Server side encryption specified but KMS authorization failed", |
| 807 | 810 | HTTPStatusCode: http.StatusBadRequest, |
| 808 | 811 | }, |
| 812 | + ErrNoAccessKey: { | |
| 813 | + Code: "AccessDenied", | |
| 814 | + Description: "No AWSAccessKey was presented", | |
| 815 | + HTTPStatusCode: http.StatusForbidden, | |
| 816 | + }, | |
| 817 | + ErrInvalidToken: { | |
| 818 | + Code: "InvalidTokenId", | |
| 819 | + Description: "The security token included in the request is invalid", | |
| 820 | + HTTPStatusCode: http.StatusForbidden, | |
| 821 | + }, | |
| 809 | 822 | |
| 810 | 823 | /// S3 extensions. |
| 811 | 824 | ErrContentSHA256Mismatch: { |