From f794708fabba690677e0e81bd929871c83af3409 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Mon, 8 Jan 2018 08:53:14 -0800 Subject: tests: rename test ssh keys to avoid appearance of leaking private keys. While the generated ssh keys are throw away keys, generating SSH keys with the default name (e.g. id_rsa) can trigger security scanners or draw unnecessary attention. The change here simply renames 'id_rsa' to 'cloud_init_rsa' to avoid a false positive reported by a scanning tool. --- tests/cloud_tests/platforms.yaml | 4 ++-- tests/cloud_tests/platforms/platforms.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/cloud_tests') diff --git a/tests/cloud_tests/platforms.yaml b/tests/cloud_tests/platforms.yaml index cb1c904b..448aa98d 100644 --- a/tests/cloud_tests/platforms.yaml +++ b/tests/cloud_tests/platforms.yaml @@ -6,8 +6,8 @@ default_platform_config: get_image_timeout: 300 # maximum time to create instance (before waiting for cloud-init) create_instance_timeout: 60 - private_key: id_rsa - public_key: id_rsa.pub + private_key: cloud_init_rsa + public_key: cloud_init_rsa.pub platforms: ec2: enabled: true diff --git a/tests/cloud_tests/platforms/platforms.py b/tests/cloud_tests/platforms/platforms.py index d4e5c561..1542b3be 100644 --- a/tests/cloud_tests/platforms/platforms.py +++ b/tests/cloud_tests/platforms/platforms.py @@ -33,7 +33,7 @@ class Platform(object): def _generate_ssh_keys(self, data_dir): """Generate SSH keys to be used with image.""" - filename = os.path.join(data_dir, 'id_rsa') + filename = os.path.join(data_dir, self.config['private_key']) if os.path.exists(filename): c_util.del_file(filename) -- cgit v1.2.3