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

Adding noAuth extension loading #10727

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

codyrancher
Copy link
Contributor

@codyrancher codyrancher commented Mar 29, 2024

Summary

Adding noAuth extension loading. This will allow specific extensions (such as extensions locale or login page modifications) to load even if the user isn't authenticated.

Fixes #9814

Areas or cases that should be tested

  • When extensions are installed
  • Extensions before a user logs in
  • Extensions after a user logs in
  • Extensions after a user logs out
  • A cluster with 2 versions of harvester and navigating between the two separate instances

Areas which could experience regressions

  • When extensions are installed
  • Extensions before a user logs in
  • Extensions after a user logs in
  • Extensions after a user logs out
  • A cluster with 2 versions of harvester and navigating between the two separate instances

Screenshot/Video

To test you can used the extensions in this repo https://github.com/rancher/ui-plugin-charts.
The uk-locale extension is one that can be loaded without authentication.

To verify you can check to see if the locale is present at the login screen:
image

You can also verify that the script tags are present in the head tag:
image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@codyrancher codyrancher added this to the v2.9.0 milestone Mar 29, 2024
@codyrancher codyrancher marked this pull request as ready for review March 29, 2024 15:44
Copy link
Contributor Author

@codyrancher codyrancher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richard-cox All of the comments/questions around changing code I'd create a separate issue and do in a separate PR. I wanted your take before doing it.

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • When installing (or upgrading to) a version of the extension with noAuth: true we should show the user some kind of warning / notification about the repercussions.
  • Somethings a bit broken with the https://github.com/rancher/ui-plugin-examples uk-loacle extension
    • there's a bad app version index.yaml
    • (probably related to above) installing 1.1.0 results in an install reporting as 1.0.0... but has the noAuth flag in... but the id loaded is uk-locale-0.1.0
  • Edit: Installing the Kamaji extension results in a new cluster explorer Multitenancy Management menu option. Clicking this in 2.9-head shows some kind of landing zone, clicking this with this branch gives an Product Multitenancy Management not found error. Not quite sure how it's so, but required investigating I hit the same issue in another branch. I think this is a general bug in their extension

shell/store/index.js Outdated Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
@codyrancher
Copy link
Contributor Author

* Somethings a bit broken with the https://github.com/rancher/ui-plugin-examples uk-loacle extension
  * there's a bad app version index.yaml
  * (probably related to above) installing 1.1.0 results in an install reporting as 1.0.0... but has the noAuth flag in... but the id loaded is uk-locale-0.1.0

I've created a PR to address this here: rancher/ui-plugin-examples#38

@codyrancher codyrancher force-pushed the no-auth-extensions branch 3 times, most recently from a63f9f9 to 5b6ae69 Compare April 10, 2024 22:17
@codyrancher
Copy link
Contributor Author

When installing (or upgrading to) a version of the extension with noAuth: true we should show the user some kind of warning / notification about the repercussions.

install-banner.mp4
update-banner.mp4

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment / suggestion regarding the warning

shell/assets/translations/en-us.yaml Outdated Show resolved Hide resolved
shell/core/plugins.js Show resolved Hide resolved
@codyrancher codyrancher merged commit e5b79e5 into rancher:master Apr 29, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extensions: Allow extensions to load before login
2 participants