@@ -551,6 +551,36 @@ By default, all service accounts in a project have rights to pull any image in
551
551
the same project, and the *builder* service account has rights to push any image
552
552
in the same project.
553
553
554
+ ifdef::openshift-origin,openshift-enterprise,openshift-dedicated,atomic-registry[]
555
+ === Listing repositories
556
+
557
+ Listing of repositories (or rather ImageStream names) is supported via `/v2/_catalog` endpoint as
558
+ documented
559
+ link:https://github.com/docker/distribution/blob/master/docs/spec/api.md#listing-repositories[upstream].
560
+ The only requirement is that the authenticated user must have `list` rights on the `imagestreams`
561
+ in the whole cluster.
562
+
563
+ Here is one example of granting a permission to list ImageStreams to a user:
564
+
565
+ ----
566
+ $ oc adm policy add-cluster-role-to-user registry-viewer user
567
+ ----
568
+
569
+ .A CLI example of listing repositories
570
+ ----
571
+ $ oc login -u user
572
+ $ curl -v -u unused:$(oc whoami -t) https://<registry_server>:<port>/v2/_catalog?n=100
573
+ ----
574
+
575
+ [IMPORTANT]
576
+ ====
577
+ This API call is very expensive for a high number of image streams in the cluster. We strongly
578
+ recommend to use
579
+ link:https://github.com/docker/distribution/blob/master/docs/spec/api.md#pagination[pagination]
580
+ instead of listing all image streams.
581
+ ====
582
+ endif::openshift-origin,openshift-enterprise,openshift-dedicated,atomic-registry[]
583
+
554
584
ifdef::openshift-origin,openshift-online,openshift-enterprise,openshift-dedicated[]
555
585
[[using-image-pull-secrets]]
556
586
== Using Image Pull Secrets
0 commit comments