Skip to content

Conversation

@ItamarYuran
Copy link
Contributor

@ItamarYuran ItamarYuran commented Mar 31, 2025

Closes #8857 (second part, see first part)

This PR leverages the parser func introduced in the first PR, to parse the resource string and allow multiple resources statements.

@ItamarYuran ItamarYuran added the include-changelog PR description should be included in next release changelog label Mar 31, 2025
@ItamarYuran ItamarYuran self-assigned this Mar 31, 2025
@ItamarYuran ItamarYuran linked an issue Mar 31, 2025 that may be closed by this pull request
@ItamarYuran ItamarYuran changed the title Resource array pt2 Support multiple resources policies PART 2 Mar 31, 2025
@github-actions
Copy link

E2E Test Results - Quickstart

12 passed

@github-actions
Copy link

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed, 1 skipped

@ItamarYuran ItamarYuran requested a review from Isan-Rivkin April 1, 2025 07:05
expected: auth.CheckAllow,
},
{
name: "read second resource, unpermitted",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
name: "read second resource, unpermitted",
name: "read second resource, denied",

}
}

func TestCheckPermissions_multipleResources(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test with 2 policies: one for allow and one for deny and make sure the deny takes effect

Copy link
Contributor Author

@ItamarYuran ItamarYuran Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added. also added tests to prevent "["this","case",]"

@ItamarYuran ItamarYuran requested a review from Isan-Rivkin April 1, 2025 11:32
@ItamarYuran ItamarYuran merged commit 59118d6 into master Apr 7, 2025
41 checks passed
@ItamarYuran ItamarYuran deleted the resource-array-pt2 branch April 7, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

include-changelog PR description should be included in next release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow multiple resources in a single policy statement.

2 participants