feat: use api-sidecar-handler to offload sshkey handling and add more types #3662
+845
−235
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.
General Checklist
Database Migrations
The node package
sshpk
doesn't support all the various key types out there. The aim of this PR is to introduce a sidecar to required services that runs a simple http server that can replace the functionality of thesshpk
package.Each
api
andwebhooks2tasks
pod will get this sidecar so that they aren't reliant on a single service for this functionality, and as there is no state it doesn't need to be a single service and fits nicely as a sidecar.It introduces new APIs to interact with user ssh keys that doesn't require the user to define the type independently. The input is just
publicKey
which can be the fullssh-ed25519 A....z
format public key (including comment). The database table for the type is also converted fromenum
tostring
to support any new types, and since the older APIs had enum enforcement, that still applies for anyone that uses the older APIs.The old APIs remain for now, but have been flagged as deprecated. They will be removed in a future release to give time for tooling and UI to be updated to use the newer APIs.
New mutation examples
Add public key
Update public key
Delete public key
Closing issues
closes #2189
closes #1584
addresses #2384 by deprecating
deleteSshKey
which takes thename
input