Commit Graph

19 Commits

Author SHA1 Message Date
7e062f5777 reintroduced ClientInfo because it does appear to work.
Most likely some error elsewhere caused it not to work previously
2024-08-24 20:34:27 +02:00
7d25f39f5b test for connecting clients and bidirectional communication to agent.
Required lots of rework since the GOBChannel appeared to be reading
ahead of the data it actually needed. Now using more low-level IO
to send the clientId over to the agent instead.
2024-08-22 16:16:02 +02:00
5d65f3bbd4 protocol version test implemented between agent and server (and found
that it did not work)
2024-08-21 23:48:37 +02:00
53534af27c test for ListenForAgentEvents implemented. 2024-08-21 17:48:47 +02:00
ed04ac035a discovered net.Pipe for testing tcp connnections which makes the
previously developed ChannelReadWriter and InmemoryConnection obsolete.
2024-08-20 11:28:09 +02:00
e9383caa01 more symmetry. SetupHeartBeat froma agent to server now done in separate
call.
2024-08-19 19:46:39 +02:00
28b95ff5db Addes agent address and client address to the client and agent info. 2024-08-12 15:23:07 +02:00
7c387d5bb4 added environment info from the client. 2024-08-10 13:00:48 +02:00
367043e0c5 When a duplicate id is requested the server now allocates a new unique id so that the session can be handled anyway. 2024-07-30 19:45:25 +02:00
bf5120aa5b refactoring towards being able to send events from Admin to UI (websocket) without exposing connection info but only metadata. 2024-07-30 19:03:21 +02:00
d17ad9bc3e Added pprof to convergeserver and optionally to
the agent if PPROF_PORT is set.

Fixed issue with converge server not cleaning up goroutines because of blocking channel. Made sure to create channels with > 1 size everywhere it can be done. The blocking behavior of a default channel size is mostly in the way.

Known issue: Killing the SSH client will lead to the server side process not being terminated and some goroutines still running in the agent. This would require additional investigation to solve. The remote processes are still being cleaned up ok (at least on linux) when the agent exits.

This should not be an issue at all since the agent is a short-lived process and when running in a containerized environment with containers running on demand the cleanup will definitely work.
2024-07-28 11:48:31 +02:00
7a51e3ac45 Unique ids for clients generated by converge server and made available to the ssh session through a net.Conn extension that passes the ID to the SSH session through the LocalAddr(). 2024-07-27 22:37:40 +02:00
5a492f3855 initialization of username, password on client (from server) and initialization of agentinfo on server is now done as soon as the agent registered and not through a side channel.
Making use of some simple utilities for GOB to make it easy to send objects over the line.
2024-07-27 20:46:53 +02:00
621bbd8ca6 GOB channel for easily and asynchronously using GOB on a single network connection, also dealing with timeouts and errors in a good way.
Protocol version is now checked when the agent connects to the converge server.

Next up: sending connection metadata and username password from server to agent and sending environment information back to the server. This means then that the side channel will only be used for expiry time messages and session type with the client id passed in so the converge server can than correlate the results back to the correct channel.
2024-07-27 11:21:35 +02:00
f82601d07c Lots of refactoring.
Now hijacking the ssh connection setup in the listener to exchange some information before passing the connection on to the SSH server.

Next step is to do the full exchange of required information and to make it easy some simple Read and Write methods with timeouts are needed that use gob.
2024-07-26 22:40:56 +02:00
Erik Brakkee
2ed81c3174 communication between agent and server. Removed the flags libray for command-line parsing.
Heartbeat mechanism from client to server over the custom connection for sending events to guarantee that the connectoin stays up.
2024-07-25 19:51:11 +02:00
d9f490a2b6 removed read and write dead lines. Appears to be still working. 2024-07-24 22:26:15 +02:00
78819f1ebe status update now reported to the server. More robustness needed. 2024-07-24 22:03:12 +02:00
459300b0d3 First version with basic communication from agent to server working. 2024-07-24 21:39:14 +02:00