cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

shell: feat. add TextBox to compare ssh-keyscan results

Open ragavpr opened this issue 1 year ago • 5 comments

Closes #17636

Enhancement to the new host key verification front, allowing to paste the results from the ssh-keyscan command to perform quick comparison

  • Compares the text with the expected fingerprint for an exact match
  • Has validation feedback in the UI

A direct copy paste of the result from the shown command should fully compare and validate

This element is added in the front Screenshot_1

Example with negative response Screenshot_2

Full view with positive response Screenshot_3

ragavpr avatar Apr 08 '23 22:04 ragavpr

@garrett I'd like to know if there's any improvement I could make on this, please provide your thoughts when you're free.

ragavpr avatar Apr 21 '23 12:04 ragavpr

Hi! Huge apologies! I somehow didn't see this earlier. (I have lots of notifications on GitHub all the time from multiple projects. Additionally, I was on vacation around the time this was first submitted and had a huge amount of notifications when I got back, so I probably misclicked and marked this as read.)

I've converted to a draft as this needs more input from myself and probably @mvollmer too.

Additionally, I think we did redesign this modal dialog somewhat recently, so I think this PR would need to be rebased and adapted.

garrett avatar Jan 24 '24 16:01 garrett

No problem, rewrote the code to integrate with the newer modal dialog, visually looks the same, code is much more readable than before thanks the newer version of patternfly.

ragavpr avatar Jan 26 '24 07:01 ragavpr

Are we ready to talk about adding automated tests for this? :-)

mvollmer avatar Jan 29 '24 12:01 mvollmer

Thanks for the review, I'll be happy to be helped with the tests, it is very new for me though.

As for initial analysis from myself, I thought of adding the getting the keyscan results, pasting and asserting the value here. https://github.com/cockpit-project/cockpit/blob/d41533c0aa4659113c43b54b36dc29938c38ab0f/test/verify/check-shell-host-switching#L76-L79

I'll slide in the GroupChat / DMs for getting input.

ragavpr avatar Feb 16 '24 06:02 ragavpr