Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-64619

oc: insecure-skip-tls-verify in kubeconfig not applied to oauth endpoint

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • Proposed
    • Bug Fix
    • Aligned oc login to correctly handle insecure-skip-tls-verify flag in the kubeconfig file cluster section.
    • None
    • None
    • None
    • None

      Hi!

      We found an interesting bug:

      • Valid certificate for the frontend ocp.foo.com
      • Invalid certificate/chain for the oauth endpoint (oauth-openshift.apps.ocp.foo.com)

      Setting insecure-skip-tls-verify inkubeconfig does not skip the verification of certs from the oauth endpoint.

      This is because setting the config to insecure happens inside this conditional: https://github.com/openshift/oc/blob/main/pkg/cli/login/loginoptions.go#L190. Note that it does work with the command line option, since that code path is different.

      If that makes sense, I can submit a PR in github to move the code outside of the initial dialToServer() call.

              rh-ee-okupka Ondřej Kupka
              holzman Burt Holzman (Inactive)
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: