This commit is contained in:
Chris Lu committed 2026-02-19 16:41:24 -08:00
1 parent c4eb2838c0
commit c4e4552e73
1 file changed
+2 -2
+2 -2
View File
@@ -30,8 +30,8 @@ func (h *S3TablesHandler) handleCreateTableBucket(w http.ResponseWriter, r *http
identityActions := getIdentityActions(r) identityActions := getIdentityActions(r)
identityPolicyNames := getIdentityPolicyNames(r) identityPolicyNames := getIdentityPolicyNames(r)
if h.shouldUseIAM(r, identityActions, identityPolicyNames) { if h.shouldUseIAM(r, identityActions, identityPolicyNames) {
sessionToken := extractSessionToken(r) allowed, err := h.authorizeIAMAction(r, identityPolicyNames, "CreateTableBucket", h.generateTableBucketARN(principal, req.Name), fmt.Sprintf("arn:aws:s3:::%s", req.Name))
if !h.authorizeIAMAction(r, identityPolicyNames, "CreateTableBucket", h.generateTableBucketARN(principal, req.Name), fmt.Sprintf("arn:aws:s3:::%s", req.Name)) { if err != nil || !allowed {
h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets") h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets")
return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets") return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets")
} }