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

Add a util function to generate the relative redirectUrl #7600

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Jul 31, 2024

Description

This PR adds a new util function to src/core/server/http/http_tools.ts, and the util function should be used by security plugin or other customized authentication plugin to generate the correct redirect url after login.

Issues Resolved

partial closes: opensearch-project/security-dashboards-plugin#2069

Screenshot

Only serve side code changes involved.

Testing the changes

The consumer logic is inside opensearch-project/security-dashboards-plugin#2072

Changelog

  • feat: Add a util function to generate the relative redirectUrl.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.64%. Comparing base (61d5c49) to head (9ee89ee).
Report is 229 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7600   +/-   ##
=======================================
  Coverage   63.64%   63.64%           
=======================================
  Files        3634     3634           
  Lines       80099    80104    +5     
  Branches    12682    12683    +1     
=======================================
+ Hits        50977    50984    +7     
+ Misses      26015    26014    -1     
+ Partials     3107     3106    -1     
Flag Coverage Δ
Linux_1 30.56% <0.00%> (-0.01%) ⬇️
Linux_2 55.59% <100.00%> (+<0.01%) ⬆️
Linux_3 40.58% <0.00%> (-0.01%) ⬇️
Linux_4 31.32% <0.00%> (-0.01%) ⬇️
Windows_1 30.57% <0.00%> (-0.01%) ⬇️
Windows_2 55.54% <100.00%> (+<0.01%) ⬆️
Windows_3 40.58% <0.00%> (-0.01%) ⬇️
Windows_4 31.32% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ananzh ananzh merged commit e947ade into opensearch-project:main Aug 8, 2024
69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2024
* feat: add get redirect url function

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit e947ade)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Aug 12, 2024
* feat: add get redirect url function

---------



(cherry picked from commit e947ade)

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Make security nextUrl comply with workspace
4 participants