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

"oc login --exec-plugin oc-oidc" does not automatically open a browser window

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      The customer is using the following command:

      oc login https://api.cl1.ocp4-sandbox.example.com:6443  --exec-plugin oc-oidc --issuer-url https://login.microsoftonline.com/0f6f68**/v2.0  --client-id 97122*** --extra-scopes email,profile,offline_access --callback-port=8080

      This results in this output:

      Please visit the following URL in your browser: http://localhost:8080
      Logged into "https://api.cl1.ocp4-sandbox.example.com:6443" as "simon.krenger@example.com" from an external oidc issuer.

      The customer would like to automatically open the browser when that is done (exactly what we implemented in `oc login -w`). So `oc login -w` does try to open a browser but `oc login [..] --exec-plugin oc-oidc` does not. It just shows "Please visit the following URL in your browser: http://localhost:8080".

      The expectation would be that it would work like -w or there was an additional switch to open the browser. Also -w and --exec-plugin cannot be used together, so that would need to be a separate option

      Version-Release number of selected component (if applicable):

      OpenShift Container Platform 4.19.10

      How reproducible:

      Always

      Steps to Reproduce:

      1. Set up an OCP 4.19 cluster with direct authentication per the documentation
      2. Perform the login with `oc login [..] --exec-plugin oc-oidc`

      Actual results:

      The following output is printed, but no browser window is opened:

      Please visit the following URL in your browser: http://localhost:8080
      Logged into "https://api.cl1.ocp4-sandbox.example.com:6443" as "simon.krenger@example.com" from an external oidc issuer.

      Expected results:

      There should be an option to automatically open a browser window (see `oc login -w` command).

      Additional info:

              aguclu@redhat.com Arda Guclu
              rhn-support-skrenger Simon Krenger
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: