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

ec2_key / setup_sshkey - fix integration tests (OpenSSH 9.5) #2406

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Dec 3, 2024

SUMMARY

With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing). However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).

setup_sshkey now:

  • Explicitly generates an 4096 bit RSA key (key_material)
  • Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
  • Explicitly generates an ed25519 key (another_key_material)
  • Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.

(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key

ADDITIONAL INFORMATION

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/69fee4ac10564f7b87bd7891d4b95d9d

✔️ ansible-galaxy-importer SUCCESS in 5m 32s
✔️ build-ansible-collection SUCCESS in 10m 40s
✔️ ansible-test-splitter SUCCESS in 4m 27s
✔️ integration-amazon.aws-1 SUCCESS in 6m 34s
Skipped 43 jobs

@alinabuzachis alinabuzachis added the mergeit Merge the PR (SoftwareFactory) label Dec 3, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/c3f62f102af84637babfe2cadaf5f18b

✔️ ansible-galaxy-importer SUCCESS in 5m 54s
✔️ build-ansible-collection SUCCESS in 10m 23s
✔️ ansible-test-splitter SUCCESS in 4m 07s
✔️ integration-amazon.aws-1 SUCCESS in 6m 49s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 5a9d6aa into ansible-collections:main Dec 3, 2024
46 checks passed
Copy link

patchback bot commented Dec 3, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/5a9d6aa104fc69b946f1d83c764c78f2cbcd68ff/pr-2406

Backported as #2407

🤖 @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 3, 2024
SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
(cherry picked from commit 5a9d6aa)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Dec 3, 2024
…2407)

This is a backport of PR #2406 as merged into main (5a9d6aa).
SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in #2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Jan 15, 2025
…-collections#2406)

SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in ansible-collections#2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Jan 15, 2025
…-collections#2406)

SUMMARY
With OpenSSH 9.5 the default format for SSH key generation was switched over to ed25519 (a good thing).  However, some older OSes don't support ed25519 (eg the older image we use for testing ec2_metadata_facts python 2 compatibility).
setup_sshkey now:

Explicitly generates an 4096 bit RSA key (key_material)
Generates the somewhat quirky md5sum based fingerprint AWS uses for RSA keys (fingerprint)
Explicitly generates an ed25519 key (another_key_material)
Pads the standard sha256 fingerprint to match the, technically correct, AWS format (another_fingerprint)

ec2_key test now also checks the fingerprint of the second imported key.
(Also fixes the issue seen in ansible-collections#2398 by switching ssh key generation back to the old 4096 bit RSA for key_material)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tests/integration/targets/setup_sshkey
tests/integration/targets/ec2_key
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants