pub enum SigV4aGateError {
MissingAuthorization,
MalformedAuthorization,
UnknownAccessKey(String),
Verify(SigV4aError),
}Expand description
Failure modes from SigV4aGate::pre_route. All variants map to
HTTP 403 with one of the two AWS-standard error codes
(InvalidAccessKeyId / SignatureDoesNotMatch / RequestTimeTooSkewed)
— see SigV4aGateError::s3_error_code.
Variants§
Implementations§
Source§impl SigV4aGateError
impl SigV4aGateError
Sourcepub fn s3_error_code(&self) -> &'static str
pub fn s3_error_code(&self) -> &'static str
AWS S3 error code that should accompany the response.
v0.8.4 #76 (audit H-6): the freshness check surfaces
RequestTimeTooSkewed (matches AWS spec); date / scope shape
failures surface as InvalidRequest (400); other failures stay
SignatureDoesNotMatch / InvalidAccessKeyId (403) so the wire
surface stays AWS-compatible.
Sourcepub fn http_status(&self) -> StatusCode
pub fn http_status(&self) -> StatusCode
HTTP status code to accompany the response. v0.8.4 #76: format
errors that are clearly client mistakes (missing / malformed
x-amz-date, malformed credential scope, wrong service) are
surfaced as 400 InvalidRequest; the rest stay 403.
Trait Implementations§
Source§impl Debug for SigV4aGateError
impl Debug for SigV4aGateError
Source§impl Display for SigV4aGateError
impl Display for SigV4aGateError
Source§impl Error for SigV4aGateError
impl Error for SigV4aGateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()