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 | ErrKMSNotConfigured | 150 | ErrKMSNotConfigured |
| 151 | ErrKMSAuthFailure | 151 | ErrKMSAuthFailure |
| 152 | 152 | ||
| 153 | ErrNoAccessKey | ||
| 154 | ErrInvalidToken | ||
| 155 | |||
| 153 | // Bucket notification related errors. | 156 | // Bucket notification related errors. |
| 154 | ErrEventNotification | 157 | ErrEventNotification |
| 155 | ErrARNNotification | 158 | ErrARNNotification |
| @@ -806,6 +809,16 @@ var errorCodeResponse = map[APIErrorCode]APIError{ · 650 unmodified lines | |||
| 806 | Description: "Server side encryption specified but KMS authorization failed", | 809 | Description: "Server side encryption specified but KMS authorization failed", |
| 807 | HTTPStatusCode: http.StatusBadRequest, | 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 | /// S3 extensions. | 823 | /// S3 extensions. |
| 811 | ErrContentSHA256Mismatch: { | 824 | ErrContentSHA256Mismatch: { |