Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prioritize explicit deny in bucket policy statements #1099

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

niksis02
Copy link
Contributor

Fixes #1092

In multi-statement bucket policies, explicit Deny rules should take precedence over Allow rules.

This change updates the implementation to iterate through all policy statements. If a Deny statement is found, it immediately returns AccessDenied. If no Deny statement is found but an Allow statement is present, access is granted.

@niksis02 niksis02 force-pushed the fix/bucket-policy-explicit-deny branch from 3f6c0e6 to 4967510 Compare February 28, 2025 18:48
@niksis02 niksis02 force-pushed the fix/bucket-policy-explicit-deny branch from 4967510 to 30f3fac Compare February 28, 2025 21:19
@benmcclelland benmcclelland merged commit 05d7649 into main Feb 28, 2025
24 checks passed
@benmcclelland benmcclelland deleted the fix/bucket-policy-explicit-deny branch February 28, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] - Deny statements in bucket policy not applied
2 participants