Skip to content

fix: resolve assumed roles for IAM simulation - #106

Merged
royosherove merged 2 commits into
mainfrom
fix/assumed-role-policy-simulation
Aug 25, 2026
Merged

fix: resolve assumed roles for IAM simulation#106
royosherove merged 2 commits into
mainfrom
fix/assumed-role-policy-simulation

Conversation

@royosherove

Copy link
Copy Markdown
Member

Summary

  • resolve STS assumed-role session ARNs to the underlying IAM role ARN before IAM policy simulation
  • preserve role paths by using the ARN returned from iam get-role
  • warn accurately when role resolution or simulation is unavailable
  • add focused behavioral tests for passthrough, assumed-role conversion, role paths, and failure handling

Verification

  • bash tests/test-permission-preflight.sh (14 passed)
  • bash tests/test-vpc-bpa.sh (26 passed)
  • bash deploy/test-templates.sh (32 passed)
  • bash -n install.sh tests/test-permission-preflight.sh
  • live assumed-role preflight in account 387904338202: Permissions verified

Reproduction

Passing the raw STS session ARN to iam simulate-principal-policy reproduces InvalidInput: Invalid ARN provided. Resolving it to the IAM role ARN makes the same simulation succeed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2da78850b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh
@royosherove
royosherove merged commit 1d7899b into main Aug 25, 2026
19 checks passed
@royosherove
royosherove deleted the fix/assumed-role-policy-simulation branch August 25, 2026 20:03
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