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

[wip] use the proper cert to verify the oauth-server #28773

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/extended/util/oauthserver/oauthserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ func waitForOAuthServerPodReady(oc *exutil.CLI) error {
}

func waitForOAuthServerRouteReady(oc *exutil.CLI) error {
routerSecret, err := oc.AdminKubeClient().CoreV1().Secrets("openshift-config-managed").Get(context.Background(), "router-certs", metav1.GetOptions{})
Copy link
Member

Choose a reason for hiding this comment

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

you should use the default-ingress-cert CM instead.

if err != nil {
return err
}

route, err := oc.AdminRouteClient().RouteV1().Routes(oc.Namespace()).Get(context.Background(), RouteName, metav1.GetOptions{})
if err != nil {
return err
Expand All @@ -232,7 +237,9 @@ func waitForOAuthServerRouteReady(oc *exutil.CLI) error {
}
return wait.PollImmediate(time.Second, time.Minute, func() (done bool, err error) {
e2e.Logf("Waiting for the OAuth server route to be ready")
transport, err := restclient.TransportFor(restclient.AnonymousClientConfig(oc.AdminConfig()))
config := restclient.CopyConfig(restclient.AnonymousClientConfig(oc.AdminConfig()))
config.TLSClientConfig.CAData = routerSecret.Data["tls.crt"]
transport, err := restclient.TransportFor(config)
if err != nil {
e2e.Logf("Error getting transport: %v", err)
return false, err
Expand Down