Credential types
What each type holds, and where it can be picked
- The types
- How a credential signs in
- Addresses in credentials
- Host and port of a login
- An SSH credential’s private key
The types
The type says what a credential is for. It decides which fields the dialog asks for, and where it can be picked:
| Type | What it holds | Used by |
|---|---|---|
| User and password | A user and password for any login: a REST API with basic auth, a service and more, with an optional host and port. The default | Playbooks, through a form’s credentials or a credential field; REST expressions |
| SSH | A user with a password or a private key for SSH to a server, with its host and port | Playbooks, through a form’s credentials, ansibleCredentials or a credential field, and a workflow node’s login |
| Git | A token, or a user and password, for git repositories | Repositories |
| API | A user and password or token for a REST API, with an optional host and port | REST expressions, a Telegram bot token, a webhook’s bearer token, the chat assistant’s API key |
| Database | A database login, with its type, host, port and database name | A database that forms query (dbConfig), from 7.5.0, or a form’s dbConfig directly; fnCredentials; it can be tested |
| CyberArk | The address of the CyberArk Central Credential Provider (CCP) and its TLS, and the AppID, client certificate and key a CyberArk store logs in with | A CyberArk secret store |
| SMTP | A mail server, its port and TLS, and its optional login (none for a relay) | A mail notification channel |
| LDAP | A directory’s servers, port, TLS and certificates, and its bind DN and password | An LDAP directory |
| Microsoft Entra ID | An app registration: its tenant ID, client ID, client secret or certificate, and redirect URI | An Entra ID provider; a mail channel sending through Microsoft 365 |
| Open ID | The client of a provider: its issuer, client ID, client secret and redirect URI | An OIDC provider |
| RTE | The token (RTE_TOKEN) and address of an RTE | An RTE runner |
| AWX, AAP, Ascender | The token or login, and the address, of that platform | A runner of that type |
| Semaphore, Rundeck | The API token and address of that product | A runner of that type |
| Jenkins | A user, its API token and the address of a Jenkins | A Jenkins runner |
| HashiCorp Vault | The token and address a Vault store logs in with | A HashiCorp Vault secret store |
| Container registry | A user and its password or token, without an address: the registry holds it. From 7.9.0 | A registry, which a builder pushes the runtime environments to and a runner pulls them from |
| Signing key | A cosign private key and its password. From 7.9.0 | A runtime environment’s sign, with which a builder signs its image |
A database credential can be of type MySQL, MSSQL, PostgreSQL, Oracle or MongoDB. From 7.5.0 it is picked by a database of Connections > Databases, and the upgrade to 7.5.0 makes one database for each, with the same name.
In the API and the config seed, the types are userpass, ssh, git, api, database, cyberark, smtp, ldap, entraid, oidc, rte, awx, aap, ascender, semaphore, rundeck, jenkins, vault, and from 7.9.0 registry and signing_key. The upgrade from 6 gives every credential the type userpass, or database for a database one: a form uses it as in 6. Change it to SSH for a login a workflow node’s playbook connects with, or to API for a REST API.
How a credential signs in
From 7.6.0 the Login step of these types first asks how the credential signs in, then shows only the fields that choice needs:
| Type | Choice | Fields |
|---|---|---|
| SSH | Log in with: Password or Private key | Password: the user and its password. Private key: the user, the PEM or OpenSSH Private key and an optional Passphrase |
| AWX, AAP, Ascender | Sign in with: Token or Password | Token: the Token, no user. Password: the user and its password |
| Git | Sign in with: Token or Password | Token: the Token, no user (git then sends the user oauth2). Password: the user and its password |
| SMTP | Sign in with: No login or Login | No login, for a relay: only the Mail server, Mail port and Use TLS. Login: those, plus the user and its password |
| Microsoft Entra ID | Sign in with: Secret or Certificate | Secret: the Client secret. Certificate: the PEM Certificate and its private key, for mail through Microsoft 365, and an optional Client secret kept for the SSO sign-in |
A credential keeps only what its choice needs: an SSH one never holds both a password and a key, the other is dropped on save. With Write to a key in the Store step, only the choices with a password are offered, not Private key, No login nor Certificate.
The other types sign in one way. A User and password or an API credential has the Add a host and port switch after its password, see Host and port of a login. The dialog names the LDAP bind password Password, the RTE token Token, and a database’s type Engine.
Addresses in credentials
From 7.3.0 a login that works on one server carries that server, so the record that uses it only names the credential:
| Record | What moved into its credential |
|---|---|
| An LDAP directory | Its servers, port, TLS, certificates and bind account, into an ldap credential named <directory>-ldap |
| An SSO provider | Its client ID and secret, tenant or issuer, and redirect URI, into an entraid or oidc credential named <provider>-sso |
| A runner | Its address and TLS, and its token or login, into a credential of its type, <runner>-token or <runner>-login |
| A secret store | Its address and TLS, and its token (<store>-token) or CyberArk AppID and certificate (<store>-appid) |
| A mail channel | Its server, port and TLS, into its smtp credential, or a new one named <channel>-smtp |
The upgrade to 7.3.0 makes these moves once. A record that already named a credential keeps it, and gets a copy of it when another record used the same login with another server. Records declared in the config seed are left as the seed has them. The credentials of the connections and sign-ins can only be changed by an admin, see Who may change a credential.
Host and port of a login
From 7.6.0 a User and password or an API credential can also hold a Host and a Port, both optional: on its Login step, the Add a host and port switch after the password shows them.
They reach the playbook and the expressions with the credential, as host and port, next to user and password: through a form’s credentials and fn.fnCredentials. A credential read from a secret store keeps its own host and port, and takes the secret’s only where it leaves them empty. SSH and database credentials always had them.
An SSH credential’s private key
From 7.6.0 an SSH credential can log in with a private key instead of its password: Log in with set to Private key asks for these:
| Field | Meaning |
|---|---|
| Private key | The PEM or OpenSSH private key the playbook logs in with. Stored encrypted, never shown again: left empty, the stored one stays. |
| Passphrase | The key’s passphrase, if it has one. Stored encrypted. |
It logs in with one or the other, never both: on save, a key drops the stored password, and Password drops the stored key and passphrase, as the credential’s page says. The key and its passphrase are never returned by the API, and are masked in job output.
When a form names the credential in ansibleCredentials, the RTE writes the key to a private temporary file (a folder of its own, readable by its user only) and passes it to the playbook as ansible_ssh_private_key_file. A key with a passphrase is loaded into an ssh-agent started for that job only, and the file is removed once it is loaded. The file and the agent are gone when the job ends, failed or aborted ones included, so no key is left behind on the RTE.
The RTE images have ssh-agent and ssh-add; an RTE of your own without them fails a job whose key has a passphrase, saying so.
A form’s credentials that names an SSH credential hands the key to the playbook as private_key, and its passphrase as private_key_passphrase. In the config seed, the key is the credential’s client_key and its passphrase key_passphrase.