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 connection: add SSE encryption parameters. #763

Conversation

fh-maxime-froment
Copy link
Contributor

@fh-maxime-froment fh-maxime-froment commented Oct 15, 2021

SUMMARY

Add the following parameters to aws_ssm.py connection plugin:

  • ansible_aws_ssm_bucket_sse_mode
  • ansible_aws_ssm_bucket_sse_kms_key_id
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

aws_ssm connection plugin

ADDITIONAL INFORMATION

This allows the connection plugin to work when encryption parameters are required for uploads on the file transfer bucket by policy / SCP (see here for an example).

@ansibullbot ansibullbot added WIP Work in progress connection connection plugin feature This issue/PR relates to a feature request needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Oct 15, 2021
Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

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

this is pretty nice! couple of inline suggestions (so far), and you'll need to add a changelog fragment as well.

@@ -554,14 +566,31 @@ def _file_transport_command(self, in_path, out_path, ssm_action):

profile_name = self.get_option('profile')

put_args = dict()
put_headers = dict()
if self.get_option('bucket_sse_mode') and self.get_option('bucket_sse_mode') in {'AES256', 'aws:kms'}:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if self.get_option('bucket_sse_mode') and self.get_option('bucket_sse_mode') in {'AES256', 'aws:kms'}:
if self.get_option('bucket_sse_mode'):

In plugins (as opposed to modules), the option documentation is used not only for generating docs, but also during runtime by the built-in plugin machinery (called Config Manager), and so the choices: section is already enforced by the time you retrieve the value here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted & changed!

Comment on lines 581 to 585
put_command_headers = "-Headers @{" + \
"; ".join(["'%s' = '%s'" % (h, v) for h, v in put_headers.items()]) + "} "
put_command = "Invoke-WebRequest -Method PUT %s-InFile '%s' -Uri '%s' -UseBasicParsing" % (
put_command_headers, in_path,
self._get_url('put_object', self.get_option('bucket_name'), s3_path, 'PUT', profile_name, put_args))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
put_command_headers = "-Headers @{" + \
"; ".join(["'%s' = '%s'" % (h, v) for h, v in put_headers.items()]) + "} "
put_command = "Invoke-WebRequest -Method PUT %s-InFile '%s' -Uri '%s' -UseBasicParsing" % (
put_command_headers, in_path,
self._get_url('put_object', self.get_option('bucket_name'), s3_path, 'PUT', profile_name, put_args))
put_command_headers = "; ".join(["'%s' = '%s'" % (h, v) for h, v in put_headers.items()])
put_command = "Invoke-WebRequest -Method PUT -Headers @{ %s } -InFile '%s' -Uri '%s' -UseBasicParsing" % (
put_command_headers, in_path,
self._get_url('put_object', self.get_option('bucket_name'), s3_path, 'PUT', profile_name, **put_args))

Somewhat opinionated, but it's ok to pass empty headers as in Invoke-WebRequest -Headers @{} so I think this reads a little better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted & changed! Additionally, since empty put_headers work in all cases, I removed the corresponding test & empty string default value for put_command_headers.

@@ -506,11 +516,13 @@ def _flush_stderr(self, subprocess):

return stderr

def _get_url(self, client_method, bucket_name, out_path, http_method, profile_name):
def _get_url(self, client_method, bucket_name, out_path, http_method, profile_name, extra_args={}):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def _get_url(self, client_method, bucket_name, out_path, http_method, profile_name, extra_args={}):
def _get_url(self, client_method, bucket_name, out_path, http_method, profile_name, **extra_args):

sanity tests (pylint) flagged {} as a dangerous default value. Changed to kwargs style.

Copy link
Contributor Author

@fh-maxime-froment fh-maxime-froment Oct 18, 2021

Choose a reason for hiding this comment

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

extra_args here are not intended to be variable length kwargs but to correspond to boto's ExtraArgs parameter used in a number of S3 methods esp. upload_fileobj

Kept a standard optional single parameter with default =None, and used named arguments for extra_args/ExtraArgs for clarity.

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

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

I think this is ready to remove [WIP] personally, and maybe we can get some review from the collection maintainers?

plugins/connection/aws_ssm.py Show resolved Hide resolved
plugins/connection/aws_ssm.py Show resolved Hide resolved
@ansibullbot
Copy link

@fh-maxime-froment this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibullbot ansibullbot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 19, 2021
@fh-maxime-froment fh-maxime-froment force-pushed the wip-connection-ssm-encrypted-uploads branch from b2a7c35 to e8e7c2e Compare October 19, 2021 09:25
@ansibullbot ansibullbot removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 19, 2021
@fh-maxime-froment fh-maxime-froment changed the title [WIP] aws_ssm connection: add SSE encryption parameters. aws_ssm connection: add SSE encryption parameters. Oct 19, 2021
@ansibullbot ansibullbot added community_review and removed WIP Work in progress labels Oct 19, 2021
@jillr
Copy link
Collaborator

jillr commented Oct 20, 2021

Thanks very much @fh-maxime-froment! Would you be able to add some examples to the plugin showing how to use the new options?

I took a quick pass a some integration tests after we talked on irc today @briantist, I do think that all the necessary IAM permissions should be there. I thought that this should cover it but I've definitely missed a step. I don't have a ton of experience using SSM though so maybe something will stand out that I overlooked?

diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
index 2b1cc70..255e656 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
@@ -99,6 +99,12 @@
       wait_for_connection:
         delay: 360
 
+    - name: create a key
+      aws_kms:
+        alias: '{{ resource_prefix }}-kms'
+        tags:
+          ansible-test: '{{ resource_prefix }}'
+
     - name: Create S3 bucket
       s3_bucket:
         name: "{{resource_prefix}}-aws-ssm-s3"
diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2 b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
index 1788a9a..9ff8bfb 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
@@ -24,6 +24,8 @@ ansible_aws_ssm_bucket_name={{s3_output.name}}
 ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin
 ansible_python_interpreter=/usr/bin/env python
 local_tmp=/tmp/ansible-local-
+ansible_aws_ssm_bucket_sse_mode='aws:kms'
+ansible_aws_ssm_bucket_sse_kms_key_id={{ resource_prefix }}-kms
 
 # support tests that target testhost
 [testhost:children]
diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
index d9d174a..744fa26 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
@@ -78,6 +78,11 @@
       ignore_errors: yes
       when: iam_role_vars_file.stat.exists == true
 
+    - name: Delete the KMS key
+      aws_kms:
+        state: absent
+        alias: '{{ resource_prefix }}-kms'
+
     - name: Delete AWS keys environement
       file:
         path: "{{playbook_dir}}/aws-env-vars.sh"

That gets me a failure on the ping test, however the console shows that the key is created:

TASK [wait_for_connection] *****************************************************
task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/connection_aws_ssm-wr6uf5ih-ÅÑŚÌβŁÈ/tests/integration/targets/connection/test_connection.yml:12
fatal: [linux_i-0276941539bac81a1]: FAILED! => {
    "changed": false,
    "elapsed": 601,
    "msg": "timed out waiting for ping module test: An error occurred (KMS.NotFoundException) when calling the PutObject operation: Invalid keyId ansible-test-11838785-zim-kms"
}

@briantist
Copy link
Contributor

Thanks very much @fh-maxime-froment! Would you be able to add some examples to the plugin showing how to use the new options?

Great idea; examples in the docs should be very doable!

I took a quick pass a some integration tests after we talked on irc today @briantist, I do think that all the necessary IAM permissions should be there. I thought that this should cover it but I've definitely missed a step. I don't have a ton of experience using SSM though so maybe something will stand out that I overlooked?

Thank you for this @jillr ! Quoting the diff so I can add diff highlighting, but I'll put it in an expand box.

Integration diff proposal
diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
index 2b1cc70..255e656 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/tasks/main.yml
@@ -99,6 +99,12 @@
       wait_for_connection:
         delay: 360
 
+    - name: create a key
+      aws_kms:
+        alias: '{{ resource_prefix }}-kms'
+        tags:
+          ansible-test: '{{ resource_prefix }}'
+
     - name: Create S3 bucket
       s3_bucket:
         name: "{{resource_prefix}}-aws-ssm-s3"
diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2 b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
index 1788a9a..9ff8bfb 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
@@ -24,6 +24,8 @@ ansible_aws_ssm_bucket_name={{s3_output.name}}
 ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin
 ansible_python_interpreter=/usr/bin/env python
 local_tmp=/tmp/ansible-local-
+ansible_aws_ssm_bucket_sse_mode='aws:kms'
+ansible_aws_ssm_bucket_sse_kms_key_id={{ resource_prefix }}-kms
 
 # support tests that target testhost
 [testhost:children]
diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
index d9d174a..744fa26 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_teardown/tasks/main.yml
@@ -78,6 +78,11 @@
       ignore_errors: yes
       when: iam_role_vars_file.stat.exists == true
 
+    - name: Delete the KMS key
+      aws_kms:
+        state: absent
+        alias: '{{ resource_prefix }}-kms'
+
     - name: Delete AWS keys environement
       file:
         path: "{{playbook_dir}}/aws-env-vars.sh"

That gets me a failure on the ping test, however the console shows that the key is created:

TASK [wait_for_connection] *****************************************************
task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/connection_aws_ssm-wr6uf5ih-ÅÑŚÌβŁÈ/tests/integration/targets/connection/test_connection.yml:12
fatal: [linux_i-0276941539bac81a1]: FAILED! => {
    "changed": false,
    "elapsed": 601,
    "msg": "timed out waiting for ping module test: An error occurred (KMS.NotFoundException) when calling the PutObject operation: Invalid keyId ansible-test-11838785-zim-kms"
}

There's a comment here that may end up being the reason why it doesn't work: #127 (comment)

When we were first testing this out, we couldn't get it to work with an encrypted bucket either. That comment mentions an up to 24 hour period before the pre-signed URL works correctly. It seemed like a long shot, but to our surprise, waiting a day actually worked for us!

That's bad news for CI though.. unless it's possible to just have this bucket exist rather than be created/destroyed during the test run? (perhaps it could be cleared at the beginning and end of each test run to prevent it filling up?).

@fh-maxime-froment
Copy link
Contributor Author

fh-maxime-froment commented Oct 20, 2021

Thanks a lot @jillr and @briantist !

Concerning the integration test: besides the issue mentioned above by @briantist, I believe that the KMS key id input should either be an ID or an alias prefixed with alias/.

Could you try with this instead?

diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2 b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
index 1788a9a..9ff8bfb 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
@@ -24,6 +24,8 @@ ansible_aws_ssm_bucket_name={{s3_output.name}}
 ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin
 ansible_python_interpreter=/usr/bin/env python
 local_tmp=/tmp/ansible-local-
+ansible_aws_ssm_bucket_sse_mode='aws:kms'
+ansible_aws_ssm_bucket_sse_kms_key_id=alias/{{ resource_prefix }}-kms
 
 # support tests that target testhost
 [testhost:children]

For a newly created bucket, it may still not work because of the issue mentioned by @briantist.
Besides keeping the bucket persistent, another way to address it is to specify the regional endpoint when getting the S3 client, e.g.

diff --git a/plugins/connection/aws_ssm.py b/plugins/connection/aws_ssm.py
index 1576512..b6e97cc 100644
--- a/plugins/connection/aws_ssm.py
+++ b/plugins/connection/aws_ssm.py
@@ -555,6 +555,7 @@ class Connection(ConnectionBase):
 
         client = session.client(
             service,
+            endpoint_url='https://s3.%s.amazonaws.com' % (region_name) if service == 's3' and region_name else None,
             config=Config(signature_version="s3v4")
         )
         return client

But that's a bit of scope for this PR and should probably be made optional as the global url otherwise returned by client.generate_presigned_url works in the general case.

fh-maxime-froment and others added 4 commits October 20, 2021 20:00
Add the following parameters to aws_ssm.py connection plugin:
* ansible_aws_ssm_bucket_sse_mode
* ansible_aws_ssm_bucket_sse_kms_key_id
@fh-maxime-froment fh-maxime-froment force-pushed the wip-connection-ssm-encrypted-uploads branch from f8d9d0b to 5c85d1d Compare October 20, 2021 11:03
@briantist
Copy link
Contributor

Thanks a lot @jillr and @briantist !

Concerning the integration test: besides the issue mentioned above by @briantist, I believe that the KMS key id input should either be an ID or an alias prefixed with alias/.

Could you try with this instead?

diff --git a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2 b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
index 1788a9a..9ff8bfb 100644
--- a/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
+++ b/tests/integration/targets/connection_aws_ssm/aws_ssm_integration_test_setup/templates/inventory-combined.aws_ssm.j2
@@ -24,6 +24,8 @@ ansible_aws_ssm_bucket_name={{s3_output.name}}
 ansible_aws_ssm_plugin=/usr/local/sessionmanagerplugin/bin/session-manager-plugin
 ansible_python_interpreter=/usr/bin/env python
 local_tmp=/tmp/ansible-local-
+ansible_aws_ssm_bucket_sse_mode='aws:kms'
+ansible_aws_ssm_bucket_sse_kms_key_id=alias/{{ resource_prefix }}-kms
 
 # support tests that target testhost
 [testhost:children]

For a newly created bucket, it may still not work because of the issue mentioned by @briantist. Besides keeping the bucket persistent, another way to address it is to specify the regional endpoint when getting the S3 client, e.g.

diff --git a/plugins/connection/aws_ssm.py b/plugins/connection/aws_ssm.py
index 1576512..b6e97cc 100644
--- a/plugins/connection/aws_ssm.py
+++ b/plugins/connection/aws_ssm.py
@@ -555,6 +555,7 @@ class Connection(ConnectionBase):
 
         client = session.client(
             service,
+            endpoint_url='https://s3.%s.amazonaws.com' % (region_name) if service == 's3' and region_name else None,
             config=Config(signature_version="s3v4")
         )
         return client

But that's a bit of scope for this PR and should probably be made optional as the global url otherwise returned by client.generate_presigned_url works in the general case.

I'll apply the patches mentioned from both of you and get that committed.

@ansibullbot ansibullbot added integration tests/integration tests tests labels Oct 20, 2021
@briantist
Copy link
Contributor

@jillr so I applied your changes to the integration tests (and Maxime's suggestion), and maybe I'm not reading it right, but it looks like all the cloud integration tests were skipped? How do they actually get run?

@briantist
Copy link
Contributor

We have a new bucket called ssm-encrypted-test-bucket that the terminator has been updated to ignore (but remove objects from). It should be encryption enabled in the next several hours, hopefully.

@jillr I've updated the tests to stop creating an S3 bucket and to instead use the one that already exists (532ccd6).

But still seeing AccessDenied errors when the tests try to execute; I can't tell where to fix that though.

@alinabuzachis
Copy link
Contributor

alinabuzachis commented Nov 22, 2021

I couldn't get these tests running locally without re-adding needs/target/connection. @tremble Why can we get rid of this? I'm just trying to understand what's missing in my setup.

Apart of that, using another S3 encrypted bucket, the PR seems to work correctly. I ran the integration tests and also tried to check any change in the S3 bucket using the console @jillr

I guess there is a problem with bucket permissions @briantist. Since @jillr is now on PTO, when they will come back (next week) will set it up.

@alinabuzachis
Copy link
Contributor

recheck

@jillr
Copy link
Collaborator

jillr commented Dec 1, 2021

@briantist I've disabled these tests in CI. We've manually tested the plugin itself and are confident that the actual code here is good. Once the merge conflict is resolved (the result of me disabling the tests, my apologies) I'm happy to merge this PR.

@fh-maxime-froment I appreciate the patience you have given us, and for adding this feature!

@briantist
Copy link
Contributor

@jillr thanks a lot! conflict has been resolved

@fh-maxime-froment
Copy link
Contributor Author

@jillr @briantist @tremble @alinabuzachis Thank you all so much for following up on testing this PR!

@briantist
Copy link
Contributor

Since 2.1.0 is already released, I updated the version_added field to 2.2.0 in 4fd084a. If this should be a different value let me know.
(note: your galaxy.yml still says 2.1.0; not sure how you all prefer to handle it but I like to bump that version to the next expected release after a new version is released)

@markuman markuman added the backport-2 PR should be backported to the stable-2 branch label Dec 4, 2021
@markuman markuman added the gate label Dec 4, 2021
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

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

LGTM!

@ansible-zuul ansible-zuul bot merged commit 08f95cc into ansible-collections:main Dec 4, 2021
@patchback
Copy link

patchback bot commented Dec 4, 2021

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/08f95cc601828196d3ddefdeaaf5cd1f608ce885/pr-763

Backported as #823

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 4, 2021
aws_ssm connection: add SSE encryption parameters.

SUMMARY
Add the following parameters to aws_ssm.py connection plugin:

ansible_aws_ssm_bucket_sse_mode
ansible_aws_ssm_bucket_sse_kms_key_id

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm connection plugin
ADDITIONAL INFORMATION
This allows the connection plugin to work when encryption parameters are required for uploads on the file transfer bucket by policy / SCP (see here for an example).

Reviewed-by: Brian Scholer <None>
Reviewed-by: Maxime <None>
Reviewed-by: Jill R <None>
Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: None <None>
(cherry picked from commit 08f95cc)
tremble pushed a commit that referenced this pull request Dec 5, 2021
aws_ssm connection: add SSE encryption parameters.

SUMMARY
Add the following parameters to aws_ssm.py connection plugin:

ansible_aws_ssm_bucket_sse_mode
ansible_aws_ssm_bucket_sse_kms_key_id

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm connection plugin
ADDITIONAL INFORMATION
This allows the connection plugin to work when encryption parameters are required for uploads on the file transfer bucket by policy / SCP (see here for an example).

Reviewed-by: Brian Scholer <None>
Reviewed-by: Maxime <None>
Reviewed-by: Jill R <None>
Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: None <None>
(cherry picked from commit 08f95cc)

Co-authored-by: Maxime <[email protected]>
@fh-maxime-froment fh-maxime-froment deleted the wip-connection-ssm-encrypted-uploads branch January 28, 2022 07:30
@tremble tremble added the backport-3 PR should be backported to the stable-3 branch label Jan 29, 2022
@patchback
Copy link

patchback bot commented Jan 29, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/08f95cc601828196d3ddefdeaaf5cd1f608ce885/pr-763

Backported as #900

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 29, 2022
aws_ssm connection: add SSE encryption parameters.

SUMMARY
Add the following parameters to aws_ssm.py connection plugin:

ansible_aws_ssm_bucket_sse_mode
ansible_aws_ssm_bucket_sse_kms_key_id

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm connection plugin
ADDITIONAL INFORMATION
This allows the connection plugin to work when encryption parameters are required for uploads on the file transfer bucket by policy / SCP (see here for an example).

Reviewed-by: Brian Scholer <None>
Reviewed-by: Maxime <None>
Reviewed-by: Jill R <None>
Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: None <None>
(cherry picked from commit 08f95cc)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 31, 2022
[PR #763/08f95cc6 backport][stable-3] aws_ssm connection: add SSE encryption parameters.

This is a backport of PR #763 as merged into main (08f95cc).
SUMMARY
Add the following parameters to aws_ssm.py connection plugin:

ansible_aws_ssm_bucket_sse_mode
ansible_aws_ssm_bucket_sse_kms_key_id

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm connection plugin
ADDITIONAL INFORMATION
This allows the connection plugin to work when encryption parameters are required for uploads on the file transfer bucket by policy / SCP (see here for an example).
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
ec2_instance incr version added to 3.3.0 for added parameters

SUMMARY
CI problems in backport-3 ansible-collections#721
And we don't won't to stop 3.2.0 release.
Let's try to put/backport it for the next release.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
ec2_instance

Reviewed-by: Gonéri Le Bouder <[email protected]>
Reviewed-by: Mark Chappell <None>
abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
…ctions#852)

ec2_instance: metadata_options version_added increased

SUMMARY
After CI troubles in the past, we've forget to backport this feature.

incr from 3.2.0 to 3.3.0 ansible-collections#763

failed backport 3 PR for 3.2.0 release ansible-collections#721


initial implementation for 3.2.0 ansible-collections#715

therefore no changelog fragment is necessary.
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION

Reviewed-by: Jill R <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch community_review connection connection plugin feature This issue/PR relates to a feature request integration tests/integration needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants