Skip to content
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

Fix for service account token to read from file #242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jdewinne
Copy link
Member

No description provided.

},
{
name: "invalid service account key",
args: []string{"registry", "add", "gcr", "--endpoint", "gcr.io", "--serviceaccountkey", "./testdata/invalid-gcr-service-account-key.json"},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should not use relative file paths. We can useembed.FS from the https://pkg.go.dev/embed package

Code should be refactored to validate regardless of whether JSON is coming from a file or from STDIN.

@good-better-beck
Copy link

good-better-beck commented Jun 15, 2023

For context:

This bug prevents vendors from connecting to Google Container Registry securely. Both replicated registry add and the GUI interface result in json parsing errors of the private key. Our documentation indicates that the error is correctable with modifications to the whitespace of the key, which is inaccurate.

See this slack thread for an example.

image_720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants