-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Authorization token expired #1900
Comments
@wulfthimm, do you know what needed for the image builder to work nicely on AWS? |
Interestingly, I found this in the terraform.tfstate file. Note the expiry time. Is something failing to acquire a new token once that one expires? {
"module": "module.registry",
"mode": "data",
"type": "aws_ecr_authorization_token",
"name": "gitpod_registry",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"authorization_token": "xxxxxxxxxxxxxxxxxxxxxxx",
"expires_at": "2020-09-24T23:34:41Z",
"id": "2020-09-24 11:34:41.314343087 +0000 UTC",
"password": "xxxxxxx",
"proxy_endpoint": "https://xxxxx.dkr.ecr.us-east-1.amazonaws.com",
"registry_id": "xxxxxx",
"user_name": "AWS"
}
}
{
"module": "module.registry",
"mode": "data",
"type": "aws_ecr_authorization_token",
"name": "gitpod_registry",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"authorization_token": "xxxxxxxxxxxxxx",
"expires_at": "2020-09-24T23:34:41Z",
"id": "2020-09-24 11:34:41.314343087 +0000 UTC",
"password": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"proxy_endpoint": "https://xxxx.dkr.ecr.us-east-1.amazonaws.com",
"registry_id": "xxxxxx",
"user_name": "AWS"
}
} |
Update: This confirms that the cause is that whatever is supposed to refresh the token, is not doing it. Any help is appreciated. Till then I will keep refreshing the token myself. |
I'm also experiencing this with AWS self-hosted, but struggled to find the correct location/format to update the Secret into. @arleif-dfactory , here's what I did, but it didn't seem to work:
What am I missing here? |
@melks What you used is the username and password encoded, not the correct token. There has to be a more elegant way, but this is what I did:
|
Hi, I'm hoping to stop using the workaround and adopt a proper solution. Which leads to the question: Is this a bug, bad setup, or just a feature (ECR token refresh) not yet supported? Can someone confirm that the token refresh is something Gitpod doesn't handle yet? Any thoughts on this capability should be added? Perhaps I can contribute towards adding the capability. |
@wulfthimm Any thoughts on this? It is something that will be fixed inside the image-builder? Or are you looking at an external process to manage the token? |
sounds like something we can fix. |
From what I found looking at some existing projects are that token-regeneration should be a way to go. There is a constant expiration time imposed on the ECR tokens that is of 12 hours and it cannot be disabled (neither should it be). I would like to work on this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
After a few hours of working perfectly Gitpod (self-hosted, AWS) suddenly stops working for cases where the .gitpod.yml contains an
image:
section.The error is Request startWorkspace failed with message: 13 INTERNAL: cannot resolve workspace image: Error response from daemon: denied: Your authorization token has expired. Reauthenticate and try again. Please file an issue if you think this is a bug.
I have been able to reproduce this multiple times by
terraform destroy
and then reinstalling.Steps to reproduce
docker run --rm -it -v "$PWD/awsinstall":"/workspace" eu.gcr.io/gitpod-io/self-hosted/installer:latest aws
Expected behavior
The workspace should continue to build and load up.
Additional information
Example repository
https://github.com/arleif-dfactory/django-locallibrary-tutorial/blob/ab-gitpod/.gitpod.yml
The text was updated successfully, but these errors were encountered: