Skip to content

Commit 97a67f0

Browse files
authored
feat(aws): support maximum-allowed S3 Express sessions (#840)
## Context S3 Express CreateSession gives an omitted session-mode header distinct semantics: AWS attempts the maximum privilege allowed by policy, trying ReadWrite before falling back to ReadOnly. The existing API could only request an explicit mode, forcing clients to choose without knowing the caller's IAM permissions. This adds a typed maximum-allowed grant selection that omits the header while preserving the exact wire behavior of explicit ReadOnly and ReadWrite grants. It remains within the existing Granter composition, fixed five-minute session lifetime, and redaction boundary. Fixes #835
1 parent 9d3208e commit 97a67f0

3 files changed

Lines changed: 219 additions & 57 deletions

File tree

services/aws-v4/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ pub use s3_access_grants::{
162162
};
163163
mod provide_credential;
164164
pub use provide_credential::{
165-
S3ExpressSessionConfig, S3ExpressSessionGrant, S3ExpressSessionGranter, S3ExpressSessionMode,
166-
S3ExpressSessionPartition, S3ExpressSessionProvider,
165+
S3ExpressSessionConfig, S3ExpressSessionGrant, S3ExpressSessionGrantSelection,
166+
S3ExpressSessionGranter, S3ExpressSessionMode, S3ExpressSessionPartition,
167+
S3ExpressSessionProvider,
167168
};
168169
pub use reqsign_aws_core::constants;
169170
pub use reqsign_aws_core::{

services/aws-v4/src/provide_credential/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
mod s3_express_session;
1919
pub use s3_express_session::{
20-
S3ExpressSessionConfig, S3ExpressSessionGrant, S3ExpressSessionGranter, S3ExpressSessionMode,
21-
S3ExpressSessionPartition, S3ExpressSessionProvider,
20+
S3ExpressSessionConfig, S3ExpressSessionGrant, S3ExpressSessionGrantSelection,
21+
S3ExpressSessionGranter, S3ExpressSessionMode, S3ExpressSessionPartition,
22+
S3ExpressSessionProvider,
2223
};

0 commit comments

Comments
 (0)