Skip to content

fix IAM.SimulatePrincipalPolicy #12542

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

Merged
merged 1 commit into from
Apr 23, 2025
Merged

Conversation

pinzon
Copy link
Member

@pinzon pinzon commented Apr 21, 2025

Motivation

This PR fixes an issue described in #12427. Where the service operation wrongly assumes that the parameter Arn is for a Policy. This PR allows the operation to accept an User, Role or Group ARN, and obtain its related policies.

Changes

  • Fix behavior of operation

Testing

  • Fix need_fixing test

@pinzon pinzon requested a review from dfangl as a code owner April 21, 2025 21:04
@pinzon pinzon added the semver: patch Non-breaking changes which can be included in patch releases label Apr 21, 2025
Copy link

LocalStack Community integration with Pro

  2 files  ±    0    2 suites  ±0   36s ⏱️ - 1h 53m 58s
196 tests  - 4 177  192 ✅  - 3 824  4 💤  - 353  0 ❌ ±0 
198 runs   - 4 177  192 ✅  - 3 824  6 💤  - 353  0 ❌ ±0 

Results for commit 458e807. ± Comparison against base commit 5e8dc09.

This pull request removes 4180 and adds 3 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.iam.test_iam.TestIAMIntegrations ‑ test_simulate_principle_policy[group]
tests.aws.services.iam.test_iam.TestIAMIntegrations ‑ test_simulate_principle_policy[role]
tests.aws.services.iam.test_iam.TestIAMIntegrations ‑ test_simulate_principle_policy[user]

Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

LGTM! The results are (obviously) wrong, but the API method now at least behaves correctly 🎉

@pinzon pinzon merged commit 2ed4e11 into master Apr 23, 2025
35 of 36 checks passed
@pinzon pinzon deleted the iam/fix/simulate-principal-policy branch April 23, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants