Skip to content
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

fix(assume_role): Set the AWS STS endpoint region #2587

Conversation

jfagoagas
Copy link
Member

Context

Fix #2583

Description

Create a new AWS Provider flag --sts-endpoint-region to specify the AWS STS region when calling assume_role and get_caller_identity.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jfagoagas jfagoagas added the no-merge Please, DO NOT MERGE this PR. label Jul 14, 2023
@jfagoagas jfagoagas requested a review from a team as a code owner July 14, 2023 07:44
@jfagoagas jfagoagas self-assigned this Jul 14, 2023
Comment on lines -14 to -18
def arn_type(arn: str) -> bool:
"""arn_type returns a string ARN if it is valid and raises an argparse.ArgumentError if not."""
if not is_valid_arn(arn):
raise argparse.ArgumentError("Invalid ARN")
return arn
Copy link
Member Author

@jfagoagas jfagoagas Jul 14, 2023

Choose a reason for hiding this comment

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

Moved to prowler/providers/aws/lib/arn/arn.py

@jfagoagas jfagoagas changed the title 2583 adding docs regarding region compatibility of session tokens for the global endpoint aws fix(assume_role): Set the AWS STS endpoint region Jul 14, 2023
@jfagoagas jfagoagas added the provider/aws Issues/PRs related with the AWS provider label Jul 14, 2023
Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

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

Awesome 🚀

@jfagoagas jfagoagas removed the no-merge Please, DO NOT MERGE this PR. label Jul 17, 2023
@jfagoagas jfagoagas merged commit 02519a4 into master Jul 17, 2023
4 checks passed
@jfagoagas jfagoagas deleted the 2583-adding-docs-regarding-region-compatibility-of-session-tokens-for-the-global-endpoint-aws branch July 17, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding docs regarding Region compatibility of session tokens for the global endpoint (AWS)
2 participants