nova should accept pre-pended comments in public keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Prior to commit 3f3f9bf22efd2fb
nova/crypto.py generate_
ssh-keygen -qlf is quite happy to process public key matter of the form
cert-authority ssh-rsa AAAAB3NzaC1yc2E
The issue is the string cert-authority at the beginning of the public key matter. This form can appear in authorized_keys to enable multiple users on a project to have individual keys certified by a central certifying authority providing access to a single administrative account. The use of ssh certificates is documented here:
Steps to reproduce:
1) Place the string """
cert-authority ssh-rsa AAAAB3NzaC1yc2E
"""
in a file
2) run nova keypair-add --pub-key <filename> <keypair name>
Expected result:
They nova keypair-list should now list the key
Actual result:
ERROR (BadRequest): Keypair data is invalid: failed to generate fingerprint (HTTP 400)
Environment:
Openstack liberty release (bug is not present on kilo)
Logs:
Sorry, not available (I'm only a user not an admin)
Suggest fix: either:
1) revert generate_
2) generate_
tags: | added: liberty-backport-potential |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
importance: | High → Undecided |
Changed in nova: | |
status: | Confirmed → Incomplete |
summary: |
- nova does not accept ssh certificate authorities (regression) + nova should accept pre-pended comments in public keys |
Changed in nova: | |
status: | Invalid → New |
tags: | added: ops |
Changed in nova: | |
assignee: | nobody → Diana Clarke (diana-clarke) |
Changed in nova: | |
assignee: | Diana Clarke (diana-clarke) → nobody |
Here is a link to the change mentioned in the bug report - http:// git.openstack. org/cgit/ openstack/ nova/commit/ ?id=3f3f9bf22ef d2fb209d2a2fe02 46f4857cd2d21a
This change implemented key generation using paramiko. The cert-authority issue has been reported to paramiko - https:/ /github. com/paramiko/ paramiko/ issues/ 771
I think this shows a gap in our current test coverage. We should add a test for the "cert-authority" case as described above. I am confirming this bug to add this test coverage.