Skip to content

Commit a1d02e4

Browse files
committed
skip anonymous account in the IAM policy check
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
1 parent ee065ea commit a1d02e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/endpoint/s3/s3_rest.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ async function authorize_request_policy(req) {
319319
}
320320

321321
async function authorize_request_iam_policy(req) {
322+
const auth_token = req.object_sdk.get_auth_token();
323+
const is_anon = !(auth_token && auth_token.access_key);
324+
if (is_anon) return;
325+
322326
const account = req.object_sdk.requesting_account;
323327
const is_iam_user = account.owner !== undefined;
324328
if (!is_iam_user) return;

0 commit comments

Comments
 (0)