Skip to content

1203 Updated to add the tenant into the short URL once the short URL is resolved#1443

Closed
leanneeliatra wants to merge 54 commits intoopensearch-project:mainfrom
leanneeliatra:2.6
Closed

1203 Updated to add the tenant into the short URL once the short URL is resolved#1443
leanneeliatra wants to merge 54 commits intoopensearch-project:mainfrom
leanneeliatra:2.6

Conversation

@leanneeliatra
Copy link
Contributor

@leanneeliatra leanneeliatra commented May 29, 2023

Description

When the tenancy is being changed after copying a short URL, if the user then pastes this short URL into a new tab, the user will be redirected to the current selected tenant, not the tenant as specified in the copied short URL.
We need to retain this information in the URL and redirect so the user is brought to the correct link, with the correct user.

Category

[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]

Why these changes are required?

To enable sharing of a short URL with the tenant as specified in the URL remaining selected as the active tenant.

What is the old behavior before changes and new behavior after changes?

The old behaviour is:

  1. A short URL is copied (tenant is specified in the URL)
  2. The tenant is changed
  3. The link is loaded in a new tab
  4. The tenant remains as is specified in 2, not as we would want/expect it to be as per the URL
    The new behaviour is:
  5. A short URL is copied (tenant is specified in the URL)
  6. The tenant is changed
  7. The link is loaded in a new tab
  8. The link is loaded with tenant info retained.

Issues Resolved

[BUG] Shortlinks to other Tenants do not work #1203

Testing

Submitting the PR for an initial review of changes, tests will follow.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

opensearch-trigger-bot bot and others added 30 commits June 25, 2022 13:14
opensearch-project#1017)

Signed-off-by: Clay Downs <downsrob@amazon.com>
(cherry picked from commit ccf0e1f)

Co-authored-by: Clay Downs <downsrob@amazon.com>
…opensearch-project#1018)

Signed-off-by: Aozixuan Priscilla Guan <aoguan@amazon.com>
(cherry picked from commit 015dc3f)

Co-authored-by: Aozixuan Priscilla Guan <92183424+aoguan1990@users.noreply.github.com>
…oject#1019)

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
(cherry picked from commit bc61403)

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
…earch-project#1020) (opensearch-project#1022)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 4527d1a)

Co-authored-by: Craig Perkins <craig5008@gmail.com>
…pensearch-project#1026)

Signed-off-by: cliu123 <lc12251109@gmail.com>
(cherry picked from commit 348c550)

Co-authored-by: Chang Liu <lc12251109@gmail.com>
…t#1025) (opensearch-project#1027)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 5e4004f)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…)" (opensearch-project#1035) (opensearch-project#1036)

This reverts commit e4e4032.

(cherry picked from commit cc5b763)

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
(cherry picked from commit b6fe0c0)

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
…oject#1051)

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
(cherry picked from commit 1065faa)

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
…search-project#1052)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 7cb5ac5)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…pensearch-project#1061)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit e87d0ec)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…oject#1075)

Signed-off-by: Craig Perkins <cwperx@amazon.com>

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit e40699d)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…sion variable (opensearch-project#1083) (opensearch-project#1085)

Signed-off-by: Ryan Liang <jiallian@amazon.com>
(cherry picked from commit 964e804)

Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
Use expiration of tokens from the id token

The like oidc token response from Gitlab expiresIn property is not the actual expiration of the idToken. idToken expires before the access_token does. This fix allows the security plugin used when integrating with Gitlab

Signed-off-by: Vasile Negru <vasile@eosfintek.com>
(cherry picked from commit 057cbe4)

Co-authored-by: Vasile Irimia <vasile.irimia@aurea.com>
…roject#1094)

Signed-off-by: Craig Perkins <cwperx@amazon.com>

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit d89d31b)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…oject#1097)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 7e4b6c3)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…pensearch-project#1103)

Signed-off-by: Ryan Liang <jiallian@amazon.com>
(cherry picked from commit 5d018b0)

Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
…nsearch-project#1105)

* Preserve URL HASH after user logs via SAML IDP

Co-authored-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
(cherry picked from commit a9d10d8)

Co-authored-by: Deepak Devarakonda <80896069+devardee@users.noreply.github.com>
* SAML Integration Tests (opensearch-project#1088)
(cherry picked from commit a4fa35d)

Signed-off-by: Deepak Devarakonda <devardee@amazon.com>
Signed-off-by: Aniketh Jain <anijainc@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: anijain-Amazon <110471048+anijain-Amazon@users.noreply.github.com>
…el (opensearch-project#1112) (opensearch-project#1117)

Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
(cherry picked from commit 3bfd7c5)

Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
…Authentication flow (opensearch-project#1134)

* SAML Integration Tests (opensearch-project#1088)

Signed-off-by: Deepak Devarakonda <devardee@amazon.com>
Signed-off-by: Aniketh Jain <anijainc@amazon.com>
Signed-off-by: Aniketh Jain <110471048+anijain-Amazon@users.noreply.github.com>
Co-authored-by: Deepak Devarakonda <devardee@amazon.com>

(cherry picked from commit a4fa35d)
(cherry picked from commit 05649d6)
…) (opensearch-project#1168)

Signed-off-by: Yan Zeng <zengyan@amazon.com>

Co-authored-by: Chang Liu <lc12251109@gmail.com>
(cherry picked from commit 6236fe2)

Co-authored-by: Yan Zeng <46499415+zengyan-amazon@users.noreply.github.com>
) (opensearch-project#1167)

* Support CI for Windows and MacOS (opensearch-project#1164)

Creates a github action to install and configure Dashboards that is reused within the workflows of this repository, its multi-platform safe.

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a21c7be)

* Support checkout out #.X branch types

Signed-off-by: Peter Nied <petern@amazon.com>
…1186)

* Saved Object Aggregation View (opensearch-project#1146)
* Move tenant-related utils to common folder (opensearch-project#1184)
* [Saved Object Aggregation View] Use namespace registry to add tenant filter (opensearch-project#1169)

Signed-off-by: Chang Liu <lc12251109@gmail.com>
Signed-off-by: Ryan Liang <jiallian@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Yan Zeng <zengyan@amazon.com>

Co-authored-by: Ryan Liang <jiallian@amazon.com>
Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: Yan Zeng <zengyan@amazon.com>
…-project#1189)

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
Co-authored-by: Chang Liu <lc12251109@gmail.com>
(cherry picked from commit 1ae8e24)
…pensearch-project#1191)

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)
…roject#1198)

Signed-off-by: Ryan Liang <jiallian@amazon.com>
(cherry picked from commit b451cb2)

Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
…opensearch-project#1213)

Signed-off-by: Chang Liu <lc12251109@gmail.com>
(cherry picked from commit b04271a)

Co-authored-by: Chang Liu <lc12251109@gmail.com>
…arch-project#1201) (opensearch-project#1214)

(cherry picked from commit 257325c)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…earch-project#1218)

Added a retry around the the bootstrap that previously failed due to network issues.  Ran the new version of this workflow 100 iterations on linux and windows, both passed at 100% [1].

Without the retry during a run of 100 iterations [2], the windows test failed once during the bootstrap.  If we see future issues, we could attempt to add retries to them following this same pattern.

[1] https://github.com/peternied/security-dashboards-plugin/actions/runs/3449518073
[2] https://github.com/peternied/security-dashboards-plugin/actions/runs/3449040181

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit 3abb707)

Co-authored-by: Peter Nied <petern@amazon.com>
opensearch-trigger-bot bot and others added 7 commits February 16, 2023 10:14
…rch-project#1332)

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit a039441)

Co-authored-by: Peter Nied <petern@amazon.com>
…ensearch-project#1323) (opensearch-project#1340)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
(cherry picked from commit d5441b2)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
…roject#1342)

The dashboard has references to an old path that does not exist anymore:
`plugins/opensearch-security/securityconfig/config.yml`.  It was
replaced by `config/opensearch-security/config.yml` in this commit:

opensearch-project/security@b44d7ea

Fix the last occurences of `plugins/opensearch-security/securityconfig`.

Signed-off-by: Romain Tartière <romain@blogreen.org>
Co-authored-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com>
(cherry picked from commit 82c27c7)

Co-authored-by: Romain Tartière <romain@blogreen.org>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
…t#1333) (opensearch-project#1341)

We've noticed there are some permissions in OpenSearch that are not included in the UX dropdown of the security-dashboards-plugin

Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit e5c0588)
…roject#1344)

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 2506898)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: leanneeliatra <leanne.laceybyrne@eliatra.com>
Signed-off-by: leanneeliatra <leanne.laceybyrne@eliatra.com>
Signed-off-by: leanneeliatra <leanne.laceybyrne@eliatra.com>
Signed-off-by: leanneeliatra <leanne.laceybyrne@eliatra.com>
Signed-off-by: leanneeliatra <leanne.laceybyrne@eliatra.com>
@davidlago
Copy link

Thanks for the contribution, @leanneeliatra! PRs need to be made into main, please switch the target branch.

@leanneeliatra
Copy link
Contributor Author

Thanks for the contribution, @leanneeliatra! PRs need to be made into main, please switch the target branch.
Thank you @davidlago, done.

Signed-off-by: Leanne Lacey-Byrne <leanne.laceybyrne@eliatra.com>
@DarshitChanpura
Copy link
Member

DarshitChanpura commented May 30, 2023

Hello @leanneeliatra thank you for opening this PR. Would you please rebase your branch with latest changes from main?

You can use following command to rebase to main from your old base-branch.

git rebase --onto main <old-base-branch> 2.6

Suggestion, you can rename the branch to something like: short-url-tenant-fix

Signed-off-by: Leanne Lacey-Byrne <leanne.laceybyrne@eliatra.com>
@leanneeliatra leanneeliatra changed the title Updated to add the tenant into the short URL once the short URL is resolved #1203 Updated to add the tenant into the short URL once the short URL is resolved May 30, 2023
@leanneeliatra leanneeliatra changed the title #1203 Updated to add the tenant into the short URL once the short URL is resolved 1203 Updated to add the tenant into the short URL once the short URL is resolved May 30, 2023
@leanneeliatra
Copy link
Contributor Author

leanneeliatra commented Jun 1, 2023

This PR has been moved to a branch that was created directly from main, and a new PR created.
#1462
The changes got a bit confusing and I thought that was a better solution & allowed for a cleaner copy of the changes. Thanks.
cc @DarshitChanpura @davidlago

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.

8 participants