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

feat(app): dynamic authentication provider support #2167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gashcrumb
Copy link
Member

@gashcrumb gashcrumb commented Jan 10, 2025

Description

This change adds support for loading authentication providers or modules from dynamic plugins. An environment variable
ENABLE_AUTH_PROVIDER_MODULE_OVERRIDE controls whether or not the backend installs the default authentication provider module. When this override is enabled dynamic plugins can be used to supply custom authentication providers. This change also adds a "components" configuration for frontend dynamic plugins, which can be used to supply overrides for the AppComponents option. This is required for dynamic plugins to be able to provide a custom SignInPage component, for example:

frontend:
  my-plugin-package:
    components:
      - name: SignInPage
        module: PluginRoot
        importName: SignInPage

Where the named export SignInPage will be mapped to components.SignInPage when the frontend is initialized.

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

I have an example using this plugin that just needs a bit more tidying up, once that's done I'll update this with a link and some steps to try this end to end.

Copy link

openshift-ci bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from gashcrumb. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

This change adds support for loading authentication providers or modules
from dynamic plugins.  An environment variable
ENABLE_AUTH_PROVIDER_MODULE_OVERRIDE controls whether or not the backend
installs the default authentication provider module.  When this override
is enabled dynamic plugins can be used to supply custom authentication
providers.  This change also adds a "components" configuration for
frontend dynamic plugins, which can be used to supply overrides for the
AppComponents option.  This is required for dynamic plugins to be able to
provide a custom SignInPage component, for example:

```
frontend:
  my-plugin-package:
    components:
      - name: SignInPage
        module: PluginRoot
        importName: SignInPage
```

Where the named export SignInPage will be mapped to
`components.SignInPage` when the frontend is initialized.

Signed-off-by: Stan Lewis <[email protected]>
Copy link
Contributor

Copy link

openshift-ci bot commented Jan 10, 2025

@gashcrumb: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-tests b21ece6 link true /test e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

1 participant