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

Update securitypolicy tool to support multiple registries #1161

Merged
merged 1 commit into from
Sep 14, 2021
Merged

Update securitypolicy tool to support multiple registries #1161

merged 1 commit into from
Sep 14, 2021

Conversation

SeanTAllen
Copy link
Contributor

Before this change, the securitypolicy tool could authorize with a registry
by providing a username and password as command-line options.

This approach worked fine as long as all images were being pulled from the
same registry. It doesn't work if you need to access multiple registries.

After this change, authorization is provided in the policy.toml on a per-image
basis. This allows for mixing and matching different registries together as
part of a pod.

Signed-off-by: Sean T. Allen [email protected]

@SeanTAllen SeanTAllen requested a review from a team as a code owner September 14, 2021 13:42
auth := authn.Basic{
Username: image.Auth.Username,
Password: image.Auth.Password}
c, _ := auth.Authorization()
Copy link
Contributor

Choose a reason for hiding this comment

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

Was wondering why this was ignored, but turns out it just returns nil always 😂.

Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

lgtm

Before this change, the securitypolicy tool could authorize with a registry
by providing a username and password as command-line options.

This approach worked fine as long as all images were being pulled from the
same registry. It doesn't work if you need to access multiple registries.

After this change, authorization is provided in the policy.toml on a per-image
basis. This allows for mixing and matching different registries together as
part of a pod.

Signed-off-by: Sean T. Allen <[email protected]>
@SeanTAllen
Copy link
Contributor Author

I got two! Can I get a merge?

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.

3 participants