Open digimer opened 2 months ago
The back-end is updated now to support the old way and the new way.
The front end needs to now show bad keys, and not worry about which host noticed first. That is to say, pull the host with the changed key from states
-> state_name
by pull the name or IP from host_key_changed::X
. The offending key is recorded in state_note
as key=Y
. If multiple entries exist with the same key (ie: one with the short host name, one with the full domain name, one with the IP), use the one that matches a hosts
-> host_name
. If none match, show the first match that isn't an IP address. If only IP addresses exist, show the first one you see.
In any case, when the user requests a bad key to be deleted, create a job for each host with the job_data
being bad_key=Y
. The back end now looks for any entry with that key and deletes them all, so the offending file/line mechanism is no longer needed.
When the front end is ready, there is legacy code to remove from the back end before this issue closes.
Additional notes:
known_hosts
, the new edition uses the key directly. Each key can be labelled with different ids, i.e., ip, host name/domainRefer to #703 for previous records of this issue.
The old way was to look up
state_uuid
s that contained thebad_file=X,bad_line=Y
. This needs to be updated so that thejob_data
is justbad_key=X
.We need to coordinate this so that we update
Remote.pm
calls that record the bad key directly, instead of the file/line.