Re:SSH agent extensions as an arbitrary RPC mechanism
by Joker_vD on Thursday June 13, 2024 @10:39PM
(#40677057)
What is so great about Unix sockets that e.g. a normal TCP socket bound to localhost or even a named pipe can not do properly?
[ Parent
| on HN ]
Re:SSH agent extensions as an arbitrary RPC mechanism
by wiktor-k on Friday June 14, 2024 @12:55AM
(#40677590)
The server can get the calling process info [0], which may be useful for local access control. TCP sockets cannot distinguish clients like that.
[0]: https://docs.rs/tokio/latest/tokio/net/struct.UnixStream.htm...
Re:SSH agent extensions as an arbitrary RPC mechanism
by dijit on Friday June 14, 2024 @05:13AM
(#40679054)
UNIX Sockets are more flexible than named pipes;
* You can use them for more than two processes communicating (eg. a server process with potentially multiple client processes connecting);
* They are bidirectional;
* They support passing kernel-verified UID / GID credentials between processes;
* They support passing file descriptors between processes;
* They support packet and sequenced packet modes.
TCP only grants you 2 of these extra features (sequenced packet mode/bidirection), leaving a giant hole in security in the process.