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

OAuth clients switched informer will not restart when switching auth from OIDC to OAuth

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.16, 4.17, 4.18, 4.19, 4.20, 4.21
    • Management Console
    • None
    • False
    • Hide

      None

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

      When enabling external OIDC authentication, OAuth related APIs and components are removed from the cluster. The console-operator watches OAuth clients via an informer, which would break when the respective resource is deleted. Therefore the InformerWithSwitch was introduced to tackle this problem; the informer stops when external OIDC is detected.

      However, when switching authentication from OIDC back to OAuth, this informer cannot be started again (as with all informers), which can lead to issues as the console-operator will not be tracking the OAuth client resources.

      To solve this, we have introduced the ControllerWithSwitch in the authentication operator. The console-operator must use a similar approach as the auth operator's OauthClientsController which can be switched on even after enabling OAuth after OIDC authentication.

      Solution consists of the following steps:

      • move the controller from the auth operator into library-go
      • use the lib-go controller in the authentication operator
      • use the lib-go controller in the console operator

              rh-ee-irinis Ilias Rinis
              rh-ee-irinis Ilias Rinis
              None
              None
              YaDan Pei YaDan Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: