Listens to incoming TCP connections from JNLP slave agents and CLI.
Security
Once connected, remote slave agents can send in commands to be executed on the master, so in a way this is like an rsh service. Therefore, it is important that we reject connections from unauthorized remote slaves.
The approach here is to have {@link jenkins.model.Jenkins#getSecretKey() a secret key} on the master.This key is sent to the slave inside the .jnlp file (this file itself is protected by HTTP form-based authentication that we use everywhere else in Hudson), and the slave sends this token back when it connects to the master. Unauthorized slaves can't access the protected .jnlp file, so it can't impersonate a valid slave.
We don't want to force the JNLP slave agents to be restarted whenever the server restarts, so right now this secret master key is generated once and used forever, which makes this whole scheme less secure.
@author Kohsuke Kawaguchi