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

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens #924

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

atiratree
Copy link
Member

@atiratree atiratree commented Sep 10, 2021

Since we are trying to switch to podman backend (#893) it makes sense to start using similar logic here (please see https://github.com/containers/image/blob/main/pkg/docker/config/config.go for reference). This fixes most of our auth issues.

We cannot fully switch to a podman backend yet, since this comes up with some incomptability issues: eg wrong auth config path order.

The implementation is also leveraging new CredentialStoreFactory interface, but for that we need the following PRs.

TODO:

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@atiratree
Copy link
Member Author

/assign @soltysh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

2 similar comments
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@atiratree
Copy link
Member Author

/hold
waiting on openshift/library-go#1205 to merge to implement a clean approach

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 10, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@atiratree
Copy link
Member Author

@dmage I have updated the description and implementation. Can you please review?

// findAuthentication looks for auth of registry in path. If ref is
// not nil, then it will be taken into account when looking up the
// authentication credentials.
func (r *AuthResolver) findAuthentication(ref reference.Named, registry string) (credentialprovider.DockerConfigEntry, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems this function is always called with ref, reference.Domain(ref), can registry string be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dmage yes, that would be simpler but I wanted it to preserve the original function as much as possible to not diverge much.

But I can simplify that if you prefer.

password string
}{
{name: "docker/docker,", input: testInput{authResolver: fn("index.docker.io", def), image: "docker/docker"}, user: def.Username, password: def.Password},
{name: "library/debian", input: testInput{authResolver: fn("docker.io", def), image: "library/debian"}, user: def.Username, password: def.Password},
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be fn("index.docker.io", def)?

Copy link
Member Author

Choose a reason for hiding this comment

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

this one is testing the old docker format

@dmage
Copy link
Contributor

dmage commented Oct 6, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2021
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 27, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@atiratree
Copy link
Member Author

/hold cancel
still waiting for openshift/library-go#1224..

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 2, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@atiratree
Copy link
Member Author

all prerequisites resolved - updated to the newest openshift/library-go

@atiratree
Copy link
Member Author

/retest

@atiratree
Copy link
Member Author

rebased

@dmage
Copy link
Contributor

dmage commented Nov 25, 2021

/lgtm
though I don't have power to approve it :)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2021
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/bugzilla refresh
/lgtm
/approve
@atiratree let's land this first and then you'll most likely need to rebase #893 but with the changes from here it should simpler, I think

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2021

@soltysh: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh
/lgtm
/approve
@atiratree let's land this first and then you'll most likely need to rebase #893 but with the changes from here it should simpler, I think

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atiratree, dmage, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2021
@soltysh
Copy link
Contributor

soltysh commented Nov 26, 2021

/retest-required

@openshift-merge-robot openshift-merge-robot merged commit 8d2b67f into openshift:master Nov 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2021

@atiratree: An error was encountered searching for bug 1858760 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. code 102: You are not authorized to access bug #1858760. Most likely the bug has been restricted for internal development processes and we cannot grant access. If you are a Red Hat customer with an active subscription, please visit the Red Hat Customer Portal for assistance with your issue If you are a Fedora Project user and require assistance, please consider using one of the mailing lists we host for the Fedora Project.

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1858760: allow Authorization Service URL to differ from Registry URL when retrieving tokens

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants