-
Notifications
You must be signed in to change notification settings - Fork 472
Insufficient scope
#2264
Comments
hi @ashtonian :
docker pull docker pull dkron/dkron
export IMAGE_ID=$(docker images|grep dkron | awk '{print $3}' )
docker tag $IMAGE_ID docker.mycompany.io:5000/zorro/dkronio:1.8.3
docker push docker.mycompany.io:5000/zorro/dkronio:1.8.3 Well try that with your own username, never the less, it worked in my case. All in all, I think this scope thing has to be about permissions management in permissions, and I consider that because I never had any issue while pushing to a private docker registry, with any "full tag path" of the form : docker.mycompany.io:5000/whatever/ifeellike:1.8.3`
# "whatever" and "ifeellike" are usually completely free of choice. Btw, thank you for the traefik setup, I was so thinking about doing that next, and completely get rid of the twisted nginx conf,to endup with a clear traefik.io, and a drastically simplified,and clear |
HI again @ashtonian : I had more results on pushing imagesAlright, here are my new results, using my latest provisioning recipe of portus :
But that's not every thing : now let's push anywhereOk, so now that you have your problem solved, of course, we want to push images to our repo (dying to actually). So here is on example I tested exactly as I describe below, and worked as you will understand, just as
johnbl@poste-devops-typique:~$ docker pull node
Using default tag: latest
latest: Pulling from library/node
844c33c7e6ea: Pull complete
ada5d61ae65d: Pull complete
f8427fdf4292: Pull complete
f025bafc4ab8: Pull complete
7a9577c07934: Pull complete
9b4289f800f5: Pull complete
c74d80ccdeab: Pull complete
b418965736e5: Pull complete
fb4cff8b8d55: Pull complete
Digest: sha256:a4ee833346b09f24095868f6a9d2c7781b6ac319821f912df05f71c6f5a4259c
Status: Downloaded newer image for node:latest
johnbl@poste-devops-typique:~$ export TEST_IMAGE_ID=$(docker images | grep node| awk '{print $3}')
johnbl@poste-devops-typique:~$ docker tag $TEST_IMAGE_ID oci-registry.pegasusio.io:5000/garciashood/node-latest:0.0.5
johnbl@poste-devops-typique:~$ docker tag $TEST_IMAGE_ID oci-registry.pegasusio.io:5000/garcia/node-latest:0.0.5
johnbl@poste-devops-typique:~$ docker login oci-registry.pegasusio.io:5000 --username jbl
Password:
WARNING! Your password will be stored unencrypted in /home/johnbl/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
johnbl@poste-devops-typique:~$ docker push oci-registry.pegasusio.io:5000/garciashood/node-latest:0.0.5
The push refers to repository [oci-registry.pegasusio.io:5000/garciashood/node-latest]
eb6930092ccc: Pushed
e07b73aa5089: Pushed
bc9e904364b4: Pushed
553039093d83: Pushed
2e517d68c391: Pushed
5f3a5adb8e97: Pushed
73bfa217d66f: Pushed
91ecdd7165d3: Pushed
e4b20fcc48f4: Pushed
0.0.5: digest: sha256:737b3a051de3db388aac1d4ef2e7cf6b96e6dcceb3e1f700c01e8c250d7d5500 size: 2215
johnbl@poste-devops-typique:~$ docker push oci-registry.pegasusio.io:5000/zorro/node-latest:0.0.5The push refers to repository [oci-registry.pegasusio.io:5000/zorro/node-latest]
eb6930092ccc: Preparing
e07b73aa5089: Preparing
bc9e904364b4: Preparing
553039093d83: Preparing
2e517d68c391: Preparing
5f3a5adb8e97: Waiting
73bfa217d66f: Waiting
91ecdd7165d3: Waiting
e4b20fcc48f4: Waiting
denied: requested access to the resource is denied
johnbl@poste-devops-typique:~$ docker push oci-registry.pegasusio.io:5000/garcia/node-latest:0.0.5
The push refers to repository [oci-registry.pegasusio.io:5000/garcia/node-latest]
eb6930092ccc: Pushed
e07b73aa5089: Pushed
bc9e904364b4: Pushed
553039093d83: Pushed
2e517d68c391: Pushed
5f3a5adb8e97: Pushed
73bfa217d66f: Pushed
91ecdd7165d3: Pushed
e4b20fcc48f4: Pushed
0.0.5: digest: sha256:737b3a051de3db388aac1d4ef2e7cf6b96e6dcceb3e1f700c01e8c250d7d5500 size: 2215
johnbl@poste-devops-typique:~$
Another and most important test
The Permissions rules stated in
|
hi @ashtonian I think possible I found what's going wrong : In your command: ["/bin/sh", "/etc/docker/registry/init"] ? It's important because it makes "trusted" (by the registry), the SSL/TLS https cetificate of your token issuer, namely your portus service at https://portus.mycompany.io/v2/token. The Certificate, in this recipe, is used three times :
# on the machine where you docker push
cp WebCertificate.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates All in all, you still have to make sure your namespaces, users, and permissions are set accordingly to the rules I detailed above, before trying to |
hi @Jean-Baptiste-Lasselle |
After correctly configuring portus and registry to read the dumped traefik certificate in Here is an traefik v2 compose file with all related services for portus and registry. Closing.
|
So it was from here that I had already seen your github username! :D SO much thank you for sharing all these infos about the certificates n traefik, I from the start planned to switch to traefik, but I didn' t want to do that before I understand completely every part of the network communication between portus background and registry. |
@ashtonian that is really excellent work on certificates and traefik, you know I have to tell you about that that I crossed roads a year and a half ago with some guys at carrefour in France, working with Google, and this guy kept saying all around that traefik can't work with SSL Certificates;and is forbidden inside all infra at carrefour. So ridiculous. I wanted to say to really tell you thank you for your work on SSL and traefik with portus, valuable. |
@ashtonian Hi again, I wanna mean a huuuuge thank you about the traefik cert dumper technique, it's like really great ! |
So, just to be sure I understand everything in your config :
|
@ashtonian I also really like you secret dedicated docker volume definition. I'll use that too from now on, in addition with HashiCorp Vault as Secret Manager |
Hi @ashtonian, I dumped this about |
Description
Steps to reproduce
I attempted to spin up portus and push an image. The registry is setup via traefik at https://registry.mysite.com and portus is available https://portus.mysite.com.
The registry logs show 401 errors about invalid scope, I'm assuming something with oauth but I can't figure out what, any help would be appreciated.
Deployment information
Deployment method: docker
Configuration:
The text was updated successfully, but these errors were encountered: