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 →
- Switch agents to WebSocket (
-webSocket) so they connect over HTTPS 443. - Disable the TCP agent port (
jenkins.slaveAgentPort: -1in JCasC). - 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.
More on Credentials & security
What credential types does Jenkins support out of the box?BeginnerWhat is the difference between Global and System credential scope?IntermediateHow do folder-scoped credentials help multi-team controllers?IntermediateHow does Jenkins mask secrets in logs and what are its limits?AdvancedWhat authorization strategies are available?IntermediateWhat are the key permissions to understand in matrix auth?Intermediate