Skip to content

mantle: work around for ssh crypto policies change#1797

Closed
dustymabe wants to merge 1 commit intocoreos:masterfrom
dustymabe:dusty-ssh-rsa-key-workaround
Closed

mantle: work around for ssh crypto policies change#1797
dustymabe wants to merge 1 commit intocoreos:masterfrom
dustymabe:dusty-ssh-rsa-key-workaround

Conversation

@dustymabe
Copy link
Member

In 5c036d1 we switched to ecdsa keys for the new crypto
policy change. In fdcfbbc we switched it back because
when we create new ssh keys on AWS we'd get an error because
that platform only accepts rsa keys:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws

For now add both a rsa key and a ecdsa key.
Using an ecdsa key allows us to workaround the updated
crypto policies in F33+ that disallow the RSA SHA-1 keyexchange
algorithm, but we still need an ssh-rsa key because AWS only
supports ssh-rsa keys and a key gets generated and added to
AWS every time we start a kola run. We'll add the rsa key
first since platform/machine/aws/flight.go only adds the first
key (keys[0]). We should be able to go back to RSA keys only
when the golang library is updated. More info in:
#1772

In 5c036d1 we swtched to ecdsa keys for the new crypto
policy change. In fdcfbbc we switched it back because
when we create new ssh keys on AWS we'd get an error because
that platform only accepts rsa keys:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws

For now add both a rsa key and a ecdsa key.
Using an ecdsa key allows us to workaround the updated
crypto policies in F33+ that disallow the RSA SHA-1 keyexchange
algorithm, but we still need an ssh-rsa key because AWS only
supports ssh-rsa keys and a key gets generated and added to
AWS every time we start a kola run. We'll add the rsa key
first since platform/machine/aws/flight.go only adds the first
key (keys[0]). We should be able to go back to RSA keys only
when the golang library is updated. More info in:
coreos#1772
@lucab
Copy link
Contributor

lucab commented Oct 20, 2020

/hold
/lgtm

Clever approach, I think it's fine as a bandaid until the x/crypto change merges. LGTM but leaving some room in case of others' feedback.

dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
@cgwalters
Copy link
Member

kola testing will still fail on AWS, no?

@miabbott
Copy link
Member

Agree with Luca on the clever nature of the approach

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dustymabe, lucab, miabbott

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [dustymabe,lucab,miabbott]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dustymabe
Copy link
Member Author

kola testing will still fail on AWS, no?

The only test that relies on the key that is uploaded to AWS working (via afterburn) is fcos.ignition.v3.noop. We would have to disable that test on AWS until we got the updated golang library support.

@dustymabe
Copy link
Member Author

after talking with Benjamin i'm re-working this a bit.

@dustymabe
Copy link
Member Author

after talking with Benjamin i'm re-working this a bit.

#1799

@dustymabe dustymabe closed this Oct 20, 2020
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
dustymabe added a commit to coreos/fedora-coreos-config that referenced this pull request Oct 20, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
kelvinfan001 pushed a commit to kelvinfan001/fedora-coreos-config that referenced this pull request Dec 14, 2020
…keys on F33

We added this in be947c2 because we needed to still be able to run kola
tests on AWS. Now we have a new workaround in COSA [1] so we don't need
to downgrade the policy for SSH in the image.

[1] coreos/coreos-assembler#1797
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants