Skip to content

fix(iam): paginate inline-policy listings#2006

Merged
vieiralucas merged 1 commit into
mainfrom
wt-iam-inline
Jun 27, 2026
Merged

fix(iam): paginate inline-policy listings#2006
vieiralucas merged 1 commit into
mainfrom
wt-iam-inline

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 27, 2026

Copy link
Copy Markdown
Member

2026-06-27 bug-hunt Tier 1 finding 1.19 (IAM, final item).

ListRolePolicies / ListUserPolicies / ListGroupPolicies hardcoded IsTruncated=false and ignored Marker/MaxItems, so a boto3 paginator treated page 1 as complete. Add a shared paginate_policy_names helper (sorted, cursor = policy name, MaxItems-bounded) and render IsTruncated + Marker across all three handlers.

Test: three inline policies on a role; MaxItems=1 pages through all three with a marker, each exactly once. IAM unit + e2e green.


Summary by cubic

Fix pagination for IAM inline policy listings so SDK paginators work correctly. ListRolePolicies, ListUserPolicies, and ListGroupPolicies now honor MaxItems/Marker and return proper IsTruncated and Marker.

  • Bug Fixes
    • Added shared paginate_policy_names helper (sorted by name; name-based cursor; MaxItems-bounded).
    • Updated all three handlers to remove hardcoded IsTruncated=false and emit IsTruncated + Marker in the XML.
    • Added e2e test covering MaxItems=1 pagination across three inline policies.

Written for commit 85520c4. Summary will update on new commits.

Review in cubic

These inline-policy listings hardcoded IsTruncated=false and ignored Marker /
MaxItems, so a boto3 paginator treated page 1 as the complete set. Add a shared
paginate_policy_names helper (sorted, cursor = policy name, MaxItems-bounded)
and render IsTruncated + Marker across all three handlers.

Test: three inline policies on a role, MaxItems=1 pages through all three with
a marker, each exactly once.
@vieiralucas vieiralucas merged commit 50111e1 into main Jun 27, 2026
104 checks passed
@vieiralucas vieiralucas deleted the wt-iam-inline branch June 27, 2026 15:14
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.

1 participant