-
Notifications
You must be signed in to change notification settings - Fork 158
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
The image is available at: |
The image is available at: |
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
1 similar comment
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days. |
The image is available at: |
0411330
to
e2d623d
Compare
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: ``` dynamicPlugins: 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. Finally, to ensure authentication providers can be managed by the user a new `providerSettings` configuration field is available for frontend dynamic plugins, which can be used to inform the user settings page of the new provider, for example: ```yaml dynamicPlugins: frontend: my-plugin-package: providerSettings: - title: Github Two description: Sign in with GitHub Org Two provider: github-two ``` Each `providerSettings` item will be turned into a new row under the "Authentication Providers" tab in the user settings. The `provider` field is used to look up the API ref for the external auth provider by expanding the simple provider name to the auth ID convention `core.auth.<provider name>`. Signed-off-by: Stan Lewis <[email protected]>
e2d623d
to
4b07d7d
Compare
The image is available at: |
Some feedback from @davidfestal that I will implement in the next day or so to help keep this future-proof against the new frontend system:
|
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:
Where the named export SignInPage will be mapped to
components.SignInPage
when the frontend is initialized. Finally, toensure authentication providers can be managed by the user a new
providerSettings
configuration field is available for frontend dynamicplugins, which can be used to inform the user settings page of the new
provider, for example:
Each
providerSettings
item will be turned into a new row under the"Authentication Providers" tab in the user settings. The
provider
field is used to look up the API ref for the external auth provider by
expanding the simple provider name to the auth ID convention
core.auth.<provider name>
.PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer
It's mostly enough to ensure that this change does not break the existing e2e tests. However to actually try this out locally I've prepared this example here. And there's also a second less good example that shows another common use-case for this functionality here