Skip to content

Noobaa mistakenly accepts NotPrincipal with Effect: Allow #8176

@alphaprinz

Description

@alphaprinz

Environment info

  • NooBaa Version: 5.16
  • Platform: Any

Actual behavior

  1. Noobaa accepts statements that has NotPrincipal and Effect: Allow, contradicting AWS doc

Statement: [
{
Effect: 'Allow',
NotPrincipal: { AWS: user_a },
Action: ['s3:PutObject'],
Resource: [arn:aws:s3:::${BKT}/*]
}
]

https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_notprincipal.html: "NotPrincipal must be used with "Effect":"Deny". Using it with "Effect":"Allow" is not supported."

Expected behavior

  1. Same as AWS.

Steps to reproduce

  1. Put bucket policy with above statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions