fix mapping of insufficient scopes return value to access denied exception by alexrashed · Pull Request #8251 · localstack/localstack · GitHub
Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

fix mapping of insufficient scopes return value to access denied exception#8251

Merged
alexrashed merged 1 commit into
masterfrom
fix-docker-access-denied
May 4, 2023
Merged

fix mapping of insufficient scopes return value to access denied exception#8251
alexrashed merged 1 commit into
masterfrom
fix-docker-access-denied

Conversation

@alexrashed

Copy link
Copy Markdown
Member

This PR relates to / extends #8215.

Motivation

We are currently seeing a new error message in the community test pipeline in -ext which indicate an error when verifying the access denied error of a docker push.

2023-05-04T08:32:39.397 DEBUG --- [  MainThread] localstack.utils.container_utils.docker_cmd_client : Pushing image with cmd: ['docker', 'push', 'alpine']
2023-05-04T08:32:39.397 DEBUG --- [  MainThread] localstack.utils.run       : Executing command: ['docker', 'push', 'alpine']
ERROR: '['docker', 'push', 'alpine']': exit code 1; output: b'Using default tag: latest\nThe push refers to repository [docker.io/library/alpine]\nf1417ff83b31: Preparing\nunauthorized: access token has insufficient scopes\n'
RERUN
../localstack/tests/integration/docker_utils/test_docker.py::TestDockerClient::test_push_access_denied[CmdDockerClient] 

While it is not clear why there are different error messages returned here, we still have to map this return to AccessDenied (as it effectively is).

Changes

  • Add case of access token has insufficient scopes to be mapped to a AccessDenied exception

@alexrashed alexrashed added the semver: patch Non-breaking changes which can be included in patch releases label May 4, 2023
@coveralls

Copy link
Copy Markdown

@github-actions

github-actions Bot commented May 4, 2023

Copy link
Copy Markdown

@alexrashed alexrashed merged commit c28ef9a into master May 4, 2023
@alexrashed alexrashed deleted the fix-docker-access-denied branch May 4, 2023 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants