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()
Auto Trait Implementations§
impl !RefUnwindSafe for SigV4aGateError
impl !UnwindSafe for SigV4aGateError
impl Freeze for SigV4aGateError
impl Send for SigV4aGateError
impl Sync for SigV4aGateError
impl Unpin for SigV4aGateError
impl UnsafeUnpin for SigV4aGateError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more