PUBAPI-1146 Divorce wanted between *_KEY_ID env vars and keyId actually sent to server #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change divorces the *_KEY_ID environment vars (and thus the input keyIds to
smartdc-auth
functions) from the keyId actually sent to the server, in order to handle compatibility with newer OpenSSH versions in a simple way.The *_KEY_ID variables will henceforth be used only to identify which key it is that the user wishes to use for authentication, and will support any known key fingerprint format. Then, the keyId actually sent to the server is generated based only on the key itself.
See also https://smartos.org/bugview/PUBAPI-1146
This change also prepares
smartdc-auth
to be used by not justsmartdc
but alsomanta
andsdc-clients
by merging the changes in the 3 separate copy-pasted versions of this code back into this library. These changes include the Manta-originated signature and key cache, and some minor API compatibility changes fromsdc-clients
.It also introduces a new commandline tool
sdc-curl
which can be used to generate signedcurl
requests for testing and development purposes.The patch makes use of
sshpk
's support for loading the public half of a private key file so that we no longer require the presence of a matching.pub
file next to a given key in$HOME/.ssh
. And makes some error messages a little more actionable for users, hopefully.And finally, it re-enables the (now no longer broken) DSA key support, and paves the way for ECDSA support in future.