CLI login using authentication type OpenID (Red Hat SSO on OCP) fails

Solution Verified - Updated -

Issue

  • oc login with a userid that is associated with authentication type OpenID which utilizes Red Hat SSO on the backend fails with the following error:

    Login failed (401 Unauthorized)
    Verify you have provided correct credentials.
    
  • The same credentials work from the WebUI using the OpenID authentication type.

  • The password, ldap and basicauth authentication types work just fine from the command line, it is just the OpenID/Red Hat SSO authentication that is failing, and only at the command line.

Environment

  • OpenShift Container Platform 4.6
  • Red Hat Single Sign On(RH SSO)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content