Unicamp-OpenPower / minicloud

Minicloud website
https://openpower.ic.unicamp.br/minicloud/
MIT License
13 stars 2 forks source link

Can't add an ED25519 public key #32

Closed MarkEWaite closed 4 years ago

MarkEWaite commented 4 years ago

Can't add an ED25519 public key

Duplication Steps

Steps to reproduce the behavior:

  1. Open the key pairs page of a project at https://minicloud.parqtec.unicamp.br/horizon/project/key_pairs
  2. Click on the "Import Public key" button
  3. Complete the public key information page by adding a public key name, public key type, and ED25519 public key data
  4. Click the "Import Public Key" button

The page will show "Unable to import key pair".

The page is able to import RSA public keys.

Expected Behavior

Public key is added to my account when I enter its value and submit the page.

Screenshots

Click the import public key button

01-minicloud-project-import-public-key

Paste the public key signature and other data

02-minicloud-project-paste-public-key-signature

Unable to import key pair

03-minicloud-project-unable-to-import-keypair

The message is unclear. It would be more clear if it said that the public key must be an RSA public key. The same flow works correctly when I use an RSA public key. The only issue here seems to be non-support of ED25519 keys.

The OpenSSH project has deprecated the SHA-1 variant of RSA while continuing to support the SHA-2 variant of RSA. Refer to this stackexchange post for an explanation and this ZDNet article for more coverage (but less clarity).

sitio-couto commented 4 years ago

Hey, @MarkEWaite. Unfortunately, the current user interface API used by the Openstack installed in our server does not recognize certain key types, and ED25519 happens to be one of them. Please, try using an RSA key (ssh-keygen -t rsa) and then adding your ED25519 public key directly in the ~/.ssh/authorized_hosts file of your virtual machine. This should suffice to dribble the API. Apologies for the inconvenience.

MarkEWaite commented 4 years ago

Thanks @sitio-couto . You're absolutely correct.

I initially didn't realize that the root issue was my use of an ED25519 key. When I saw in other bug reports that ED25519 keys are not supported, that was the inspiration to try an RSA key.