Skip to content

Commit ff58a6b

Browse files
add CreateSession() action
1 parent 6077755 commit ff58a6b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

policy/action.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ const (
206206
// PutObjectFanOutAction - PutObject like API action but allows PostUpload() fan-out.
207207
PutObjectFanOutAction = "s3:PutObjectFanOut"
208208

209+
// S3Express CreateSession action
210+
CreateSessionAction = "s3express:CreateSession"
211+
209212
// AllActions - all API actions
210213
AllActions = "s3:*"
211214
)
@@ -271,6 +274,7 @@ var supportedActions = map[Action]struct{}{
271274
RestoreObjectAction: {},
272275
ResetBucketReplicationStateAction: {},
273276
PutObjectFanOutAction: {},
277+
CreateSessionAction: {},
274278
AllActions: {},
275279
}
276280

policy/condition/keyname.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ const (
157157
// S3AuthType - optionally use this condition key to restrict incoming requests to use a specific authentication method.
158158
S3AuthType KeyName = "s3:authType"
159159

160+
// S3ExpressSessionMode - optionally use this condition key to control who can create a ReadWrite or ReadOnly session.
161+
S3ExpressSessionMode = "s3express:SessionMode"
162+
160163
// Refer https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging-and-policies.html
161164
ExistingObjectTag KeyName = "s3:ExistingObjectTag"
162165
RequestObjectTagKeys KeyName = "s3:RequestObjectTagKeys"
@@ -313,6 +316,7 @@ var CommonKeys = append([]KeyName{
313316
S3SignatureAge,
314317
S3XAmzContentSha256,
315318
S3LocationConstraint,
319+
S3ExpressSessionMode,
316320
AWSReferer,
317321
AWSSourceIP,
318322
AWSUserAgent,

0 commit comments

Comments
 (0)