Initial commit for multiple authentication#1110
Initial commit for multiple authentication#1110cliu123 merged 60 commits intoopensearch-project:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1110 +/- ##
==========================================
- Coverage 72.07% 71.82% -0.26%
==========================================
Files 88 88
Lines 1959 2023 +64
Branches 258 268 +10
==========================================
+ Hits 1412 1453 +41
- Misses 490 508 +18
- Partials 57 62 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
CI failed. |
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
This reverts commit 892180f508e2fabb31030de5d1178cf68c7820f2. Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com> Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
* Refactor + add support to run saml based integ tests via selenium web driver Signed-off-by: Deepak Devarakonda <devardee@amazon.com> * Add plugins.security.unsupported.restapi.allow_securityconfig_modification in developer guide Signed-off-by: Deepak Devarakonda <devardee@amazon.com> * Add one more test Signed-off-by: Deepak Devarakonda <devardee@amazon.com> * Added tests for checking tenancy retention after logout in SAML Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Lint formatting fixes Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Removed unused imports Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Add plugins.security.unsupported.restapi.allow_securityconfig_modification in developer guide Signed-off-by: Deepak Devarakonda <devardee@amazon.com> * Added License header Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added building the plugin bundles while running ITs Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Signed off the commit Removed a comment no longer required Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added debug loggers for checking IT failures Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added debug loggers for checking IT failures Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added debug loggers for checking IT failures Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added debug loggers for checking IT failures Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added a new stage for debug loggers before cleanup Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added a new stage for debug loggers before cleanup Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added logger to print error recieved from auth info during saml login Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added Docker host N/W Config to allow connection to SAML IDP Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added discovery type config to be single node for passing bootstrap checks Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Debug loggers Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Debug loggers Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Debug loggers Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Reverted run command to see change in error Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Trying with full docker image of OS Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Refactored the integration test yaml to use OS Full Docker image Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Removed all debug loggers Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added selfSigned package for generating certs and integrated with saml-idp Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Deleted checked-in key and cert for saml-idp server Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Reverted use of docker image and testing again with manual build Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Reverted use of docker image and testing again with manual build Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Upgraded version from 2.3 to 2.4 Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Removed debug pointers Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Commented out failing IT temporarily Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Lint formatting fix Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added the commented failing test back again Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Removed assertion from test again to make it pass Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Used a better XPath and improved error logging in tests Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Removed an unused XPath Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added back the assertion for failing IT Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Added steps to run Selenium based Integ Tests Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Commented out the test, will re-enable it again in the fix PR Signed-off-by: Aniketh Jain <anijainc@amazon.com> * Parameterized the getDriver function Signed-off-by: Aniketh Jain <anijainc@amazon.com> Signed-off-by: Deepak Devarakonda <devardee@amazon.com> Signed-off-by: Aniketh Jain <anijainc@amazon.com> Co-authored-by: Deepak Devarakonda <devardee@amazon.com> Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
f0b004f to
c152ad0
Compare
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
peternied
left a comment
There was a problem hiding this comment.
Great feature for Dashboard users - thanks for this effort!
I think you found some problems with the previous conventions where switch/casing is used instead of something like an 'authentication handler' interface. This is causing lots of potential gaps where functionality could be missing / broken and its hard to know if it is being exercised. Lets look at a couple of this places with different behavior patterns and see if we can generalize. Then a single auth handler or multiple will look identical at the different code touchpoints and it will be trivial to add more auth types in the future.
Note; I only managed to review ~50% of the file so I might have more feedback when I get time to do the final pass
public/apps/account/test/__snapshots__/log-out-button.test.tsx.snap
Outdated
Show resolved
Hide resolved
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
9b0c17f to
d7113e3
Compare
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1110-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 eee08a5f1d91850c741a0085ea5f2beccaf0c343
# Push it to GitHub
git push --set-upstream origin backport/backport-1110-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.xThen, create a pull request where the |
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com> Co-authored-by: Craig Perkins <cwperx@amazon.com> Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Co-authored-by: anijain-Amazon <110471048+anijain-Amazon@users.noreply.github.com> Co-authored-by: Deepak Devarakonda <devardee@amazon.com> Co-authored-by: Chang Liu <lc12251109@gmail.com> (cherry picked from commit eee08a5)
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com> Co-authored-by: Craig Perkins <cwperx@amazon.com> Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Co-authored-by: anijain-Amazon <110471048+anijain-Amazon@users.noreply.github.com> Co-authored-by: Deepak Devarakonda <devardee@amazon.com> Co-authored-by: Chang Liu <lc12251109@gmail.com> (cherry picked from commit eee08a5)
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com> Co-authored-by: Craig Perkins <cwperx@amazon.com> Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Co-authored-by: anijain-Amazon <110471048+anijain-Amazon@users.noreply.github.com> Co-authored-by: Deepak Devarakonda <devardee@amazon.com> Co-authored-by: Chang Liu <lc12251109@gmail.com> (cherry picked from commit eee08a5)
Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com> Co-authored-by: Craig Perkins <cwperx@amazon.com> Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com> Co-authored-by: anijain-Amazon <110471048+anijain-Amazon@users.noreply.github.com> Co-authored-by: Deepak Devarakonda <devardee@amazon.com> Co-authored-by: Chang Liu <lc12251109@gmail.com> (cherry picked from commit eee08a5)
Signed-off-by: Aozixuan Priscilla Guan aoguan@amazon.com
Description
The purpose of this project is to leverage functionalities to allow OpenSearch Dashboards (OSD) users to Login/ Logout from the integrated Login/Logout UI with different authentication methodologies. OSD administer can enable single or multiple authentication type(s) on demand by setting up OpenSearch Dashboards configuration YML. For OpenSearch Dashboards with Security Plugin enabled, at least one authentication type is required.
Category
[New Feature]
Why these changes are required?
As for now, OpenSearch Dashboards supports many types of authentications including Basic, OIDC, SAML, LDAP, Proxy and Client-Certificate based authentication. However, only one authentication type can be configured in OpenSearch Dashboard while there is a high demand shows the opposite way. After capturing and analyzing customer requests from both GitHub and OpenSearch Community, the great value of enabling multiple authentication types simultaneously in OpenSearch Dashboards is self-evident.
Related Customer Request
GitHub Issues:
#1112
#2099
#74
OpenSeach Community Issues:
#354
#3164
#10553
#10233
#7015
What is the old behavior before changes and new behavior after changes?
Currently, OpenSearch Dashboards only allows users to login with single authentication type. Users can either use built-in login with username and password, or use single sign-on with external SAML/OIDC IDP. The following pain-points are observed:
In order to address the pain-points, this project proposes to utilize integrated and customizable Login/Logout UI to allow users to login/logout OpenSearch Dashboards with multiple authentication types, including Basic, SAML, OIDC and Anonymous.
Issues Resolved
Testing
[unit testing, integration testing and manual testing]
Check List
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.