Jenkins must be reachable by GitHub webhooks, but the UI must stay internal. Design the exposure.
IntermediateScenarioCredentials & security
Answer
Situation read → Split public and private paths.
What I'd do →
- Internal ingress/load balancer for the full UI, behind VPN or SSO proxy.
- A separate public ingress that routes only
/github-webhook/(and/sonarqube-webhook/if Sonar is external) to the Jenkins service; return 404 for everything else. - Restrict the public path to GitHub's hook IP ranges and require the webhook secret.
- Alternatively use a relay (a small service in a DMZ, or GitHub's webhook forwarding via a queue) so Jenkins has no inbound exposure.
Why → Minimal public surface while keeping instant builds.
Interview tip → Mention webhook HMAC verification as a second layer.
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