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

[Backport 2.x] Dynamic sign in options #4137

Merged
merged 4 commits into from
Mar 26, 2024
Merged

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 25e2e51 from #3869.

### 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>
@peternied
Copy link
Member

@davidosorno Could you please look into what is failing the tests in this backported PR, is there a missing backport(s)?

Signed-off-by: Craig Perkins <[email protected]>
@cwperks
Copy link
Member

cwperks commented Mar 21, 2024

Backported the changes in RestHelper from #2733 that this PR relies on for testing.

cwperks added 2 commits March 21, 2024 11:17
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 87.09677% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 65.85%. Comparing base (bfe93b9) to head (66b8b27).
Report is 12 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x    #4137      +/-   ##
==========================================
+ Coverage   65.76%   65.85%   +0.09%     
==========================================
  Files         297      298       +1     
  Lines       21157    21190      +33     
  Branches     3461     3464       +3     
==========================================
+ Hits        13913    13954      +41     
+ Misses       5514     5505       -9     
- Partials     1730     1731       +1     
Files Coverage Δ
...earch/security/privileges/PrivilegesEvaluator.java 72.12% <100.00%> (+0.08%) ⬆️
...opensearch/security/rest/DashboardsInfoAction.java 79.06% <100.00%> (+0.49%) ⬆️
...arch/security/securityconf/DynamicConfigModel.java 100.00% <ø> (ø)
...ch/security/securityconf/DynamicConfigModelV7.java 65.71% <100.00%> (+0.19%) ⬆️
...search/security/securityconf/impl/v6/ConfigV6.java 63.02% <100.00%> (+0.63%) ⬆️
...search/security/securityconf/impl/v7/ConfigV7.java 78.71% <100.00%> (+0.32%) ⬆️
...ch/security/securityconf/DynamicConfigModelV6.java 0.00% <0.00%> (ø)
...urity/securityconf/impl/DashboardSignInOption.java 88.88% <88.88%> (ø)
...ity/dlic/rest/api/MultiTenancyConfigApiAction.java 90.54% <84.61%> (-1.27%) ⬇️

... and 7 files with indirect coverage changes

@peternied peternied merged commit 80cee28 into 2.x Mar 26, 2024
88 checks passed
@peternied peternied deleted the backport/backport-3869-to-2.x branch March 26, 2024 11:11
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.

2 participants