Credentials
Store
-
Credentials are
scoped
to a store -
: system is the name of the store
Domain
- Stores contain subdomains
- Global domain (unrestricted):
_
Add credential
- : Add credential to
global domain
in thesystem store
- Example credentials:
SSH username + private key
Credentials definition
<list>
<com.cloudbees.plugins.credentials.domains.DomainCredentials plugin="[email protected]">
<!-- Global domain -->
<domain>
<specifications />
</domain>
<credentials>
<!-- SSH username + private-key -->
<com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey plugin="[email protected]">
<scope>GLOBAL</scope>
<id>4a5af8cc-b399-4107-a28d-a05e2f63d0cf</id>
<description>My ssh key to the remote host</description>
<username>blue-user</username>
<usernameSecret>false</usernameSecret>
<privateKeySource class="com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource">
<privateKey>
<secret-redacted />
</privateKey>
</privateKeySource>
</com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey>
<!-- Secret text -->
<org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl plugin="[email protected]">
<scope>GLOBAL</scope>
<id>MYSQL_PASSWORD</id>
<description>My top secret database password</description>
<secret>
<secret-redacted />
</secret>
</org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl>
<!-- Username + Password -->
<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
<scope>GLOBAL</scope>
<id>09f8a402-cd46-4272-853d-d81901746874</id>
<description></description>
<username>hvitoi</username>
<password>
<secret-redacted />
</password>
<usernameSecret>false</usernameSecret>
</com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
</credentials>
</com.cloudbees.plugins.credentials.domains.DomainCredentials>
</list>