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

Add SSO support #12

Closed
stefcameron opened this issue Dec 9, 2020 · 1 comment
Closed

Add SSO support #12

stefcameron opened this issue Dec 9, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@stefcameron
Copy link
Contributor

Currently, the extension only supports MCC instances that use basic username/password authentication. It doesn't support instances that have configured Keycloak to use a third-party OAuth provider such as Google SSO.

The major challenge is that every time the user needs to provide their password (which is once to list the clusters, and then once for every cluster they want to add, because each cluster requires a cluster-specific token for its kubeconfig), we have to launch some sort of "web view" -- or figure out how to go to the browser to let the user so the SSO part -- in order to get the auth token since we can't ask them for their password.

It remains to be seen how much of this is possible within the "sandbox" realm of an extension in Lens.

@stefcameron stefcameron added the enhancement New feature or request label Dec 9, 2020
@stefcameron
Copy link
Contributor Author

stefcameron commented Dec 10, 2020

Remove the notice in the README after implementing this.

@stefcameron stefcameron added this to the v2.2.0 milestone Jan 7, 2021
@stefcameron stefcameron self-assigned this Feb 2, 2021
stefcameron added a commit that referenced this issue Feb 3, 2021
Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
stefcameron added a commit that referenced this issue Feb 3, 2021
Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
stefcameron added a commit that referenced this issue Feb 4, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
stefcameron added a commit that referenced this issue Feb 9, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
stefcameron added a commit that referenced this issue Feb 10, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
stefcameron added a commit that referenced this issue Mar 10, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new "Use SSO" checkbox in Login component.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
stefcameron added a commit that referenced this issue Mar 12, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
stefcameron added a commit that referenced this issue Mar 13, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
stefcameron added a commit that referenced this issue Mar 13, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
stefcameron added a commit that referenced this issue Mar 13, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
stefcameron added a commit that referenced this issue Mar 24, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
stefcameron added a commit that referenced this issue Mar 24, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
stefcameron added a commit that referenced this issue Apr 15, 2021
Fixes #12

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
stefcameron added a commit that referenced this issue Apr 16, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
stefcameron added a commit that referenced this issue Apr 17, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring, which
at this point should ONLY BE 'add clusters' under SSO. Everything
else _should_ be working now.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
stefcameron added a commit that referenced this issue Apr 21, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring, which
at this point should ONLY BE 'add clusters' under SSO. Everything
else _should_ be working now.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
stefcameron added a commit that referenced this issue Apr 24, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring, which
at this point should ONLY BE 'add clusters' under SSO. Everything
else _should_ be working now.

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
stefcameron added a commit that referenced this issue Apr 24, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring, which
at this point should ONLY BE 'add clusters' under SSO. Everything
else _should_ be working now.

*** SHOULD BASIC AUTH SUPPORT BE REMOVED? ***

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 24, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

REMOVE HTTPS CERT WORKAROUND BEFORE MERGE TO MASTER! MCC instance
with SSO enabled for testing currently has invalid cert chain,
so this is needed as a temporary workaround during development.

SEE '// DEBUG' COMMENTS for what still needs refactoring, which
at this point should ONLY BE 'add clusters' under SSO. Everything
else _should_ be working now.

*** SHOULD BASIC AUTH SUPPORT BE REMOVED? ***

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 26, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 26, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 26, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 26, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 27, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 30, 2021
- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
stefcameron added a commit that referenced this issue Apr 30, 2021
The extension leverages the new `lens://` protocol handler
feature in Lens 4.2 to support Container Cloud instances
that use Keycloak OAuth/SSO for authN. It still supports
instances that use basic auth (for now; this support will
be removed in the next version).

- Fixes #12: SSO
- Fixes #216: SSO instructions
- Fixes #215: Make sure bad password can be fixed during "add
  clusters" event

Done:
- Renamed existing `AuthProvider` to `BasicAuthProvider`. This
  provider will fail with an error notification if it's used
  with an MCC instance that requires SSO auth.
- Added new `SsoAuthProvider` for handling all things SSO. This
  provider will fail with an error notification if it's used with
  an MCC instance that does not support Keycloak SSO auth.
- Moved a few effects out of View.js and into useClusterLoder.js hook
  to cut down on module size.
- Added 'SSO support' section to README with instructions on how
  to configure the MCC instance's Keycloak Client to work with the
  extension since it relies on `lens://` protocol handler requests.
- Added new util.js method to make console logging more helpful
  and consistent, replaced all existing `console` calls with new
  `logger` calls.
- `AuthClient` now supports both Basic auth and SSO auth.
- Auto-refreshing tokens under SSO works.
- Possible to activate a cluster without having to re-query for
  the list of clusters that was already loaded (if any).
- Renamed ClustersProvider to ClusterDataProvider to make it
  more different from ClusterActionsProvider when we use
  it throughout the code (we had `clustersActions` and
  `clusterActions` objects; now we have `clusterDataActions`
  and `clusterActions` with less chance of a mistake).
- Fixed a bug in eventBus.ts where an exception thrown in an
  event handler would cause the event bus to infinitely call
  that handler in a loop.
- Added 'Refresh' feature where once clusters are loaded, the
  'Sign in' button changes to 'Refresh' and clicking it uses
  existing creds to reload/refresh the cluster list without
  going through full auth again (if creds are still valid).
- Added ability to filter clusters to a list of specified
  namespaces via the 'add clusters' extension event.
- Added instructions to Help section in README.
- Cluster selection is limited to ONE cluster when using SSO
  because supporting multiple clusters would lead to a really
  bad UX (browser opening multiple times, user likely missing
  some of them) and spaghetti code (because it's more than just
  async requests since the event loop goes idle while waiting
  for the user to respond in the browser).
- Added new "Refresh Data" experience where it's now possible
  to refresh (i.e. reload) clusters from the instance without
  re-authenticating (basic and SSO).
- 'Add Clusters' via SSO now shows an info message to inform
  the user to expect their browser to open, and to click on
  "Open Lens" after authorization, and like the Login view,
  provides a Cancel button to abort the process in case something
  goes wrong in the browser.
- While adding clusters via SSO, there is now a notice about the
  browser opening to generate the tokens for the cluster, as well
  as a Cancel button in case something goes wrong in the browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant