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

aws_ssm signed url using v2 and thus aws_ssm generates incompatible curl request to download s3 object for ansible python #352

Merged
merged 5 commits into from
Jan 13, 2021

Conversation

ramvalleru
Copy link
Contributor

SUMMARY

Issue is with botocore which still uses V2 signature by default instead of V4 signature. This result in malformed CURL http url to download Ansible python script from S3. Issue is documented in botocore boto/botocore#2109.

Include fix to #351

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_ssm connection

ADDITIONAL INFORMATION

if self.get_option('region') is None:
region_name = 'us-east-1'
else:
region_name = self.get_option('region')
Copy link
Member

Choose a reason for hiding this comment

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

You can actually just do, and this will also cover the case where the region is an empty string:

region_name = self.get_option('region') or 'us-east-1'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been addressed with the new commits.

Copy link
Member

@goneri goneri left a comment

Choose a reason for hiding this comment

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

Thank you for the Pull Request. We need a changelog fragment before we can merge it. Can you please add one? https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs

@ramvalleru
Copy link
Contributor Author

Thank you for the Pull Request. We need a changelog fragment before we can merge it. Can you please add one? https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs

Change log set has been updated and pushed.

@ansibullbot ansibullbot added bug This issue/PR relates to a bug connection connection plugin has_issue needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Jan 13, 2021
@goneri goneri merged commit 406c577 into ansible-collections:main Jan 13, 2021
@goneri
Copy link
Member

goneri commented Jan 13, 2021

Thank you @ramvalleru for your contribution :-).

alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…url request to download s3 object for ansible python (ansible-collections#352)

- AWS SDKs that were released before May 2016, request Signature Version 4
- fix generated url for aws s3 object for ansible python that executes ansible playbook usingh aws_ssm
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
…url request to download s3 object for ansible python (ansible-collections#352)

- AWS SDKs that were released before May 2016, request Signature Version 4
- fix generated url for aws s3 object for ansible python that executes ansible playbook usingh aws_ssm
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
…url request to download s3 object for ansible python (ansible-collections#352)

- AWS SDKs that were released before May 2016, request Signature Version 4
- fix generated url for aws s3 object for ansible python that executes ansible playbook usingh aws_ssm
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug connection connection plugin has_issue needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants