What are the Jenkins credential scopes and domains?
AdvancedConceptJenkins
Answer
Scope controls visibility: System credentials are usable by Jenkins itself (agent connections, email) but not by jobs; Global credentials are usable by any job. Credentials can also be defined at folder level (or on a user), making them visible only to jobs in that folder, which is the main tool for tenant isolation. Domains restrict a credential to specific hostnames or URL patterns for plugins that support it.
Use folders plus folder-scoped credentials and Role-Based Authorization or Folder Authorization so team A cannot bind team B's deployment credentials.
More on Jenkins
What is Jenkins and how is its architecture organised?BeginnerWhat are executors, nodes and labels in Jenkins?IntermediateWhy should you not run builds on the Jenkins controller?BeginnerHow do inbound (JNLP/WebSocket) and SSH agents connect to the controller?IntermediateWhat is a Jenkinsfile and where does it live?BeginnerDeclarative versus Scripted Pipeline: what are the differences?Intermediate