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

snapshotter: don't touch original nydusd auth if no auth in labels #212

Merged
merged 1 commit into from
Nov 22, 2021
Merged

snapshotter: don't touch original nydusd auth if no auth in labels #212

merged 1 commit into from
Nov 22, 2021

Conversation

changweige
Copy link
Contributor

Nydusd must pull data from registry with auth if the repo is private.
Snapshotter only fetches auth from labels and if no auth in the labels,
it will use empty string to replace the original auth.

This causes nydusd lossing auth to access registry.

Signed-off-by: Changwei Ge [email protected]

Password: labels[label.ImagePullSecret],
func FromLabels(labels map[string]string) *PassKeyChain {
u, found := labels[label.ImagePullUsername]
if !found {
Copy link
Member

Choose a reason for hiding this comment

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

should check for empty username/password as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. It now also checks if the values are void string.

Nydusd must pull data from registry with auth if the repo is private.
Snapshotter only fetches auth from labels and if no auth in the labels,
it will use empty string to replace the original auth.

This causes nydusd lossing auth to access registry.

Signed-off-by: Changwei Ge <[email protected]>
@bergwolf bergwolf merged commit 3b35329 into dragonflyoss:master Nov 22, 2021
@changweige changweige deleted the g-not-touch-auth branch November 26, 2021 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants