2020-12-07 16:10:59 -05:00
|
|
|
|
|
|
|
|
|
.. khe1563458421728
|
|
|
|
|
.. _kubernetes-admin-tutorials-authentication-and-authorization:
|
|
|
|
|
|
2021-05-21 17:03:32 -03:00
|
|
|
|
=======================================================
|
|
|
|
|
Local Docker Registry Authentication and Authorization
|
|
|
|
|
=======================================================
|
2020-12-07 16:10:59 -05:00
|
|
|
|
|
|
|
|
|
Authentication is enabled for the local Docker registry. When logging in,
|
|
|
|
|
users are authenticated using their platform keystone credentials.
|
|
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
|
|
$ docker login registry.local:9001 -u <keystoneUserName> -p <keystonePassword>
|
|
|
|
|
|
2023-02-28 14:02:05 +00:00
|
|
|
|
An authorized administrator ('admin' and 'sysinv') can perform any Docker
|
|
|
|
|
action. Regular users can only interact with their own repositories (i.e.
|
|
|
|
|
registry.local:9001/<keystoneUserName>/). Any authenticated user can pull from
|
2021-04-19 00:22:38 -04:00
|
|
|
|
the following list of public images:
|
2021-03-05 09:23:14 -03:00
|
|
|
|
|
|
|
|
|
.. _kubernetes-admin-tutorials-authentication-and-authorization-d383e50:
|
|
|
|
|
|
|
|
|
|
- registry.local:9001:/public/\*
|
|
|
|
|
|
|
|
|
|
- registry.local:9001:/k8s.gcr.io/pause
|
|
|
|
|
|
|
|
|
|
- registry.local:9001:/quay.io/jetstack/cert-manager-acmesolver
|
|
|
|
|
|
|
|
|
|
The **mtce** user can only pull public images, but cannot push any images.
|
|
|
|
|
|
|
|
|
|
For example, only **admin** and **testuser** accounts can push to or pull from
|
2020-12-07 16:10:59 -05:00
|
|
|
|
**registry.local:9001/testuser/busybox:latest**
|
|
|
|
|
|
2021-03-05 09:23:14 -03:00
|
|
|
|
.. _kubernetes-admin-tutorials-authentication-and-authorization-d383e87:
|
|
|
|
|
|
2020-12-07 16:10:59 -05:00
|
|
|
|
---------------------------------
|
|
|
|
|
Username and Docker compatibility
|
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
|
|
Repository names in Docker registry paths must be lower case. For this reason,
|
|
|
|
|
a keystone user must exist that consists of all lower case characters. For
|
|
|
|
|
example, the user **testuser** is correct in the following URL, while
|
|
|
|
|
**testUser** would result in an error:
|
|
|
|
|
|
|
|
|
|
**registry.local:9001/testuser/busybox:latest**
|
|
|
|
|
|
2021-03-05 09:23:14 -03:00
|
|
|
|
.. note::
|
|
|
|
|
Use of the auto-generated self-signed certificate for the registry
|
|
|
|
|
certificate is not recommended. If you must do so, then from the central
|
|
|
|
|
cloud/systemController, access to the local registry can only be done using
|
|
|
|
|
registry.local:9001. registry.central:9001 will be inaccessible. Installing
|
|
|
|
|
a |CA|-signed certificate for the registry and the certificate of the |CA| as
|
2021-10-26 17:31:52 -04:00
|
|
|
|
an 'ssl_ca' certificate will remove this restriction.
|
2021-03-05 09:23:14 -03:00
|
|
|
|
|
2020-12-07 16:10:59 -05:00
|
|
|
|
For more information about Docker commands, see
|
|
|
|
|
`https://docs.docker.com/engine/reference/commandline/docker/ <https://docs.docker.com/engine/reference/commandline/docker/>`__.
|
|
|
|
|
|