-
Notifications
You must be signed in to change notification settings - Fork 159
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
[FEATURE] Dynamic Sign in options for OpenSearch Dashboards #1573
Comments
[Triage] Hi @cwperks thank you for filing this issue. Going to tag this help wanted for the time being. |
Here's a screenshot where 2 authenticators are configured for OpenSearch-Dashboards. Basic Auth + SAML. This is Basic Auth + SAML for logging into dashboards. Here's a zip of the configuration as well. 2.10.0-saml-plus-basic-multiauth.zip The outcome of this issue will be to dynamically change what is shown on the login screen. Through the admin page an admin could configure login with basic + SAML, or remove the option to login with SAML and just have basic (username + pw), or remove basic and have login with SAML by itself (in which case the login screen won't appear and a user will be re-directed to the SAML IdP's login screen). Any change would be dynamic and not require a reboot of OSD. |
Not all combinations of multi-auth may be valid initially. Its possible to have multiple single-sign on buttons, but the prompt for username and pw can only appear once. The prompt for username and pw is shown when OSD is configured either with:
Single sign on would apply to SAML and OIDC. Other auth types would not go through the sign in screen and are out of scope. Other auth types include clientcert, proxy and jwt. Only the following combinations of auth types are valid to configure for multiauth:
|
@EduardoCorazon and I are working on this feature and I proposed the following UX/UI design However @cwperks mentioned that " |
Thank you for posting the mockups @davidosorno and @EduardoCorazon! The UX will need to reflect what valid combos a user can choose from for showing login options on the login screen. There are 2 broad categories:
Valid combos are:
|
In general, we should consider offering a UX with guardrails and guides the users to complete the tasks. So, a few relateed questions: @cwperks
|
Thank you @kamingleung. See my answers below. The documentation on multi-auth on the documentation website is pretty extensive: https://opensearch.org/docs/latest/security/configuration/multi-auth/
and also configuring
with this feature, an admin would be able to dynamically change whether the SSO button appears on the login screen w/o having to change the What I would like to do in the future is be able to start a cluster with Basic Authentication and then configure another SSO provider like SAML or OIDC directly in OpenSearch Dashboards. |
Thank you @cwperks for your extensive response, very helpful! If this feature is purely on configuring what appears on the login the screen, we should explicitly name it that way to avoid confusion (especially when the security plugin UI also deal with backend configurations). I also wonder if we can simplify the UX by removing the multi-auth switch:
cc: @kgcreative |
I agree that we should offer configuring auth methods within Dashboards, this can allow a much more end-to-end experience under a single pane. |
We're mixing "read-only" interfaces with an editable interface here. I would suggest a discrete "edit" button that either opens a flyout or a dedicated page for this. This would also make this page a bit less fragile |
+1 on @kgcreative comment. For UI components, let's align with the common patterns defined in OUI. Here's a quick proposal. This page is displaying read-only content, let's be consistent by keeping the new section read-only and add a dedicated Edit flow. We can replace the "Apply changes" button with a Edit button: I would suggest clicking on Edit will open a modal to update the options: |
This is what I've done so far based on the feedback I got. It gets the sign in options based on authentications available at the back end, so I used HTTP type to get it. When Security plugin is installed it has BASIC authentication by default, then the user may update their choices. I'm still working on updating values on back end, and here are the repos so far. |
Thanks @davidosorno for this update! Does the "SignIn Option Status" column reflect the current config? This feels redundant and potentially confusing. (For example, in the view you show, would unchecking "basic" change the status from "Enable" to "Disable"? If so, then i'd argue it's not needed. |
Thanks for the feedback @kgcreative. |
I think the feature is ready, and I'm working on testing the UI. It would be great if I can get some feedback about it, here are the updated repos: |
@davidosorno Thank you for providing the branches. Its awesome to see the feature working to change the signin options from the admin pages! A couple of items:
Can these settings be maintained (albeit change their behavior slightly) in order to be backward compatible so that when clusters upgrade there is no change in config?
Great work! |
@cwperks Thanks for the feedback.
Sounds good.
This value is used to create a MultiAuthentication handler that it's totally different from the sign in options panel.
Yes, I 'll fix it.
That's strange, the Update button should be disabled when there is not option selected or when the options are equal to the actual configuration, I'll take a look. |
On the UI, I am wondering if we can simplify this by integrating this setting as part of the sign-in options:
Would there be a case for users to configure multiple sign-in options that are neither Basic auth, SAML, OpenID? |
@davidosorno Would it be possible to post a quick walkthrough video capture of your implementation? E.g. Start from AuthZ AuthN page > go to "Sign-in options" > click on edit, unselect all options > Select options > Save |
signin-options.mp4 |
I just found this code and I'm wondering if we are going to keep this behavior, any thoughts on this?
Also, I already fixed initial values and the route. |
@davidosorno Let's keep that in, but I think it would be possible to remove that restriction in the future. Curious, if you were to remove that restriction and setup 2 SSO methods (i.e. SAML and anonymous), would it render 2 buttons according to each method to sign in or would it produce an error? I'm wondering if there is other work that would need to be done to the login page so that it doesn't render the username and password input. |
Right now if we remove the Basic authentication it doesn't show an error, it renders the authentication types buttons available. @cwperks should we include the Anonymous option by default in SignIn options or should we include it only if it is enable in config.yml file? |
Only if its enabled. It would be an invalid combo to have anonymous disabled, but have multiauth configured with anonymous. |
I updated the branch to reflect the following changes:
Also, I found this SAML Auth can not be enable with Anonymous, however I think we don't need to implement sign in options restrictions right now because there is a feature requested for this behaviour. |
|
@davidosorno There are static settings (in IMO we can update the default from |
@davidosorno A few UI tweaks to align with our OUI patterns:
On the Authentication page: |
Good evening @kamingleung , I wanted to inquire on the transition from Eui to Oui since as referenced here: [OUI] Refactor namespacing to use OUI instead of EUI #2573 it appears that Oui is aliased to EUI. And since we're currently facing global styling issues when using Oui components and the rest of OpenSeach uses Eui, I wanted to know if the tweaks for OUI patterns involves calling Ex. we keep using |
@ashwin-pc -- can you provide Eduardo with some guidance here? My understanding is you'll continue to use |
@EduardoCorazon yes. All EUI references inside OSD and its plugins are under the hood aliased to OUI. You cannot directly reference OUI in the code yet. |
### Description **New Feature** Allow admins to define the sign-in options that will be displayed on OpenSearch Dashboard login page. There are couple of sign-in options defined in [Security documentation](https://opensearch.org/docs/latest/security/configuration/multi-auth/), and theses options must be available in security _config.yml_ file to be able to change them dynamically in Security Dashboard. Furthermore, if `anonymous_auth_enabled` is true it will be available in Security Dashboard sign-in options to allow admins enable or disable it. *Old Behavior* Admins have to update _opensearch_dashboards.yml_ adding or removing sign-in options, and then restart Dashboards to be able to log in using other sign-in option. *New Behavior* Admins can change sign-in options dynamically without having to restart the Dashboards, and the changes are applied immediately. Users just need to logout in order to see the sign-in options available. ### Issues Resolved - Related opensearch-project/security-dashboards-plugin#1573 ### Testing Unit Testing, Integration Testing, and Manual Testing. ### Check List - [x] New functionality includes testing - [ ] New functionality has been documented - [x] Commits are signed per the DCO using --signoff By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: David Osorno <[email protected]>
### Description **New Feature** Allow admins to define the sign-in options that will be displayed on OpenSearch Dashboard login page. There are couple of sign-in options defined in [Security documentation](https://opensearch.org/docs/latest/security/configuration/multi-auth/), and theses options must be available in security _config.yml_ file to be able to change them dynamically in Security Dashboard. Furthermore, if `anonymous_auth_enabled` is true it will be available in Security Dashboard sign-in options to allow admins enable or disable it. *Old Behavior* Admins have to update _opensearch_dashboards.yml_ adding or removing sign-in options, and then restart Dashboards to be able to log in using other sign-in option. *New Behavior* Admins can change sign-in options dynamically without having to restart the Dashboards, and the changes are applied immediately. Users just need to logout in order to see the sign-in options available. ### Issues Resolved - Related opensearch-project/security-dashboards-plugin#1573 ### Testing Unit Testing, Integration Testing, and Manual Testing. ### Check List - [x] New functionality includes testing - [ ] New functionality has been documented - [x] Commits are signed per the DCO using --signoff By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: David Osorno <[email protected]> (cherry picked from commit 25e2e51) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### Description **New Feature** Allow admins to define the sign-in options that will be displayed on OpenSearch Dashboard login page. There are couple of sign-in options defined in [Security documentation](https://opensearch.org/docs/latest/security/configuration/multi-auth/), and theses options must be available in security _config.yml_ file to be able to change them dynamically in Security Dashboard. Furthermore, if `anonymous_auth_enabled` is true it will be available in Security Dashboard sign-in options to allow admins enable or disable it. *Old Behavior* Admins have to update _opensearch_dashboards.yml_ adding or removing sign-in options, and then restart Dashboards to be able to log in using other sign-in option. *New Behavior* Admins can change sign-in options dynamically without having to restart the Dashboards, and the changes are applied immediately. Users just need to logout in order to see the sign-in options available. ### Issues Resolved - Related opensearch-project/security-dashboards-plugin#1573 ### Testing Unit Testing, Integration Testing, and Manual Testing. ### Check List - [x] New functionality includes testing - [ ] New functionality has been documented - [x] Commits are signed per the DCO using --signoff By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: David Osorno <[email protected]>
Is your feature request related to a problem?
Since OS 2.4, the security-dashboards-plugin has supported having multiple login options from the login screen: #1110
Configuring multi auth is done via settings in
opensearch_dashboards.yml
. Example:Since these settings are defined in
opensearch_dashboards.yml
its not possible to change the configuration without restarting OpenSearch-Dashboards. It could be useful to make these settings dynamic to allow cluster admins to change these settings without having to restart dashboards.What solution would you like?
Allow cluster admins to change multi-auth settings dynamically
Do you have any additional context?
A similar feature was implemented for multi-tenancy: #1302
The text was updated successfully, but these errors were encountered: