3f07b4
% containers-auth.json(5)
3f07b4
3f07b4
# NAME
3f07b4
containers-auth.json - syntax for the registry authentication file
3f07b4
3f07b4
# DESCRIPTION
3f07b4
3f07b4
A credentials file in JSON format used to authenticate against container image registries.
3f07b4
On Linux it is stored at `${XDG_RUNTIME_DIR}/containers/auth.json`;
3f07b4
on Windows and macOS, at `$HOME/.config/containers/auth.json`
3f07b4
3f07b4
## FORMAT
3f07b4
3f07b4
The auth.json file stores encrypted authentication information for the
3f07b4
user to container image registries.  The file can have zero to many entries and
3f07b4
is created by a `login` command from a container tool such as `podman login`,
3f07b4
`buildah login` or `skopeo login`.  Each entry includes the name of the registry and then an auth
3f07b4
token in the form of a base64 encoded string from the concatenation of the
3f07b4
username, a colon, and the password.
3f07b4
3f07b4
The following example shows the values found in auth.json after the user logged in to
3f07b4
their accounts on quay.io and docker.io:
3f07b4
3f07b4
```
3f07b4
{
3f07b4
	"auths": {
3f07b4
		"docker.io": {
3f07b4
			"auth": "erfi7sYi89234xJUqaqxgmzcnQ2rRFWM5aJX0EC="
3f07b4
		},
3f07b4
		"quay.io": {
3f07b4
			"auth": "juQAqGmz5eR1ipzx8Evn6KGdw8fEa1w5MWczmgY="
3f07b4
		}
3f07b4
	}
3f07b4
}
3f07b4
```
3f07b4
3f07b4
An entry can be removed by using a `logout` command from a container
3f07b4
tool such as `podman logout` or `buildah logout`.
3f07b4
3f07b4
In addition, credential helpers can be configured for specific registries and the credentials-helper
3f07b4
software can be used to manage the credentials in a more secure way than depending on the base64 encoded authentication
3f07b4
provided by `login`.  If the credential helpers are configured for specific registries, the base64 encoded authentication will not be used
3f07b4
for operations concerning credentials of the specified registries.
3f07b4
3f07b4
When the credential helper is in use on a Linux platform, the auth.json file would contain keys that specify the registry domain, and values that specify the suffix of the program to use (i.e. everything after docker-credential-).  For example:
3f07b4
3f07b4
```
3f07b4
{
3f07b4
    "auths": {
3f07b4
        "localhost:5001": {}
3f07b4
    },
3f07b4
    "credHelpers": {
3f07b4
		"registry.example.com": "secretservice"
3f07b4
	}
3f07b4
}
3f07b4
```
3f07b4
3f07b4
For more information on credential helpers, please reference the [GitHub docker-credential-helpers project](https://github.com/docker/docker-credential-helpers/releases).
3f07b4
3f07b4
# SEE ALSO
3f07b4
    buildah-login(1), buildah-logout(1), podman-login(1), podman-logout(1), skopeo-login(1), skopeo-logout(1)
3f07b4
3f07b4
# HISTORY
3f07b4
Feb 2020, Originally compiled by Tom Sweeney <tsweeney@redhat.com>