Skip to content

registry-facade fails to authenticate against Google Artifact Registry #11454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
csweichel opened this issue Jul 18, 2022 · 13 comments
Closed

registry-facade fails to authenticate against Google Artifact Registry #11454

csweichel opened this issue Jul 18, 2022 · 13 comments
Assignees
Labels
blocked component: registry-facade meta: 🤔 reporter-feedback-needed cannot process further since we need more info from the reporter team: workspace Issue belongs to the Workspace team type: bug Something isn't working

Comments

@csweichel
Copy link
Contributor

Bug description

When using Google Artifact Registry as image-build registry - or as airgap mirror, workspace starts fail after some time of inactivity. That's because registry-facade can no longer authenticate against GAR properly. Restarting registry-facade resolves the issue.

In this case, registry-facade reports:

{
    "@type": "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent",
    "error": "httpReadSeeker: failed open: unexpected status code https://europe-docker.pkg.dev/v2/some-project/some-registry/gitpod/supervisor/blobs/sha256:6bd5243cce7ba86c48d29f5b75f93d11e57b5d69a49ecaddc8b27a8d6e6e5d1d: 401 Unauthorized - Server message: unauthorized: not authenticated: No valid credential was supplied.",
    "level": "error",
    "message": "cannot get blob",
    "serviceContext": {
        "service": "registry-facade",
        "version": "commit-51980e6c1f8a5352f7f7c66957674f89c1e36c58"
    },
    "severity": "ERROR",
    "time": "2022-07-13T10:39:07Z"
}

Steps to reproduce

Don't use registry-facade for a while

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

@csweichel csweichel added type: bug Something isn't working component: registry-facade team: workspace Issue belongs to the Workspace team labels Jul 18, 2022
@kylos101 kylos101 moved this to Scheduled in 🌌 Workspace Team Jul 18, 2022
@utam0k utam0k self-assigned this Jul 26, 2022
@utam0k utam0k moved this from Scheduled to In Progress in 🌌 Workspace Team Jul 26, 2022
@kylos101
Copy link
Contributor

Thank you for looking at this, @utam0k ! FYI, assuming we are able to solve the problem, when done, we'll want to share with the self-hosted team, so they can make a judgement about whether to include as a hot fix, or wait to include in the next release.

cc: @gitpod-io/engineering-self-hosted

@lucasvaltl
Copy link
Contributor

Fwiw, for me this sounds like it's worth including in a hotfix :)

@utam0k
Copy link
Contributor

utam0k commented Jul 28, 2022

I have not reproduced this issue yet, but I found the docs about the authentication of Docker Registry v2.

expires_in
(Optional) The duration in seconds since the token was issued that it will remain valid. When omitted, this defaults to 60 seconds. For compatibility with older clients, a token should never be returned with less than 60 seconds to live.
https://docs.docker.com/registry/spec/auth/token/

@mrsimonemms
Copy link
Contributor

We've historically found with GAR that, like GCR, you need to include both the URL and the server address (docs). Have you configured it like that?

@utam0k
Copy link
Contributor

utam0k commented Aug 1, 2022

@mrsimonemms Thanks for your help. I followed this instruction.
#10266

@kylos101 kylos101 moved this from In Progress to Backlog in 🌌 Workspace Team Aug 1, 2022
@kylos101 kylos101 moved this from Breakdown to Scheduled in 🌌 Workspace Team Aug 5, 2022
@sagor999
Copy link
Contributor

sagor999 commented Aug 5, 2022

We need more info here.
How was auth setup for GAR here? Was it a token or service account?
As @utam0k mentioned, we cannot repro this issue so far.

@sagor999
Copy link
Contributor

sagor999 commented Aug 5, 2022

According to affected customer, using service account.
So it is odd indeed that it loses authentication after some X amount of hours. 🤔
Could it be that GAR does something extra here and requires you to relogin after X amount of hours?

@sagor999 sagor999 removed the blocked label Aug 5, 2022
@sagor999 sagor999 self-assigned this Aug 9, 2022
@sagor999
Copy link
Contributor

sagor999 commented Aug 9, 2022

We are waiting on customer to provide a bit more info.
Also some more info posted in this issue as well: https://github.com/gitpod-io/customers/issues/71

@kylos101
Copy link
Contributor

@sagor999 @utam0k let's leave this in in-progress while waiting for feedback. 🙏 In general, we shouldn't move things backwards to Breakdown or Scheduled...unless of course we found an issue we closed needs to be reopened because it is happening again in production.

@kylos101 kylos101 moved this from Scheduled to In Progress in 🌌 Workspace Team Aug 10, 2022
@kylos101
Copy link
Contributor

kylos101 commented Aug 11, 2022

@utam0k I added blocked label, removed Pavel as assignee (thank you for your feedback @sagor999 ), and added a note on the project to indicate we're waiting on customer feedback. Please leave in in-progress for now, and refer scheduled groundwork column. 🙏 We won't be able to resume this till September (we're waiting for customer feedback).

@utam0k
Copy link
Contributor

utam0k commented Aug 25, 2022

I have created the snapshot of this preview env and delete the preview env to save money

@kylos101
Copy link
Contributor

Removing the related high priority for now, and reached out to @julia-leyton for help.

@kylos101
Copy link
Contributor

@julia-leyton I am going to close this issue for now, we could not recreate it. If the customer is able to recreate and share a related support bundle, let us know? Happy to reopen.

Repository owner moved this from In Progress to Awaiting Deployment in 🌌 Workspace Team Sep 15, 2022
@kylos101 kylos101 moved this from Awaiting Deployment to Done in 🌌 Workspace Team Sep 15, 2022
@kylos101 kylos101 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
Repository owner moved this from Done to Awaiting Deployment in 🌌 Workspace Team Sep 15, 2022
@jenting jenting moved this from Awaiting Deployment to Done in 🌌 Workspace Team Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked component: registry-facade meta: 🤔 reporter-feedback-needed cannot process further since we need more info from the reporter team: workspace Issue belongs to the Workspace team type: bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants