Interview Prep/Jenkins/Credentials & security

Your Jenkins exposes the TCP agent port 50000 to the internet for remote agents. What do you change?

BeginnerScenarioCredentials & security
Answer

Situation read → Unnecessary exposed port.

What I'd do →

  1. Switch agents to WebSocket (-webSocket) so they connect over HTTPS 443.
  2. Disable the TCP agent port (jenkins.slaveAgentPort: -1 in JCasC).
  3. Close the firewall rule.

Why → One HTTPS endpoint behind the proxy with TLS is simpler to secure.

Interview tip → Mention agent secrets still authenticate the connection either way.

All Jenkins questions Roadmap: Jenkins

More on Credentials & security