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

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

Closed
wants to merge 54 commits into from

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#1018)

Signed-off-by: Aozixuan Priscilla Guan <[email protected]>
(cherry picked from commit 015dc3f)

Co-authored-by: Aozixuan Priscilla Guan <[email protected]>
…oject#1019)

Signed-off-by: Darshit Chanpura <[email protected]>
(cherry picked from commit bc61403)

Co-authored-by: Darshit Chanpura <[email protected]>
…t#1025) (opensearch-project#1027)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 5e4004f)

Co-authored-by: Craig Perkins <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
(cherry picked from commit b6fe0c0)

Co-authored-by: Darshit Chanpura <[email protected]>
…oject#1051)

Signed-off-by: Darshit Chanpura <[email protected]>
(cherry picked from commit 1065faa)

Co-authored-by: Darshit Chanpura <[email protected]>
…search-project#1052)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 7cb5ac5)

Co-authored-by: Craig Perkins <[email protected]>
…pensearch-project#1061)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit e87d0ec)

Co-authored-by: Craig Perkins <[email protected]>
…oject#1075)

Signed-off-by: Craig Perkins <[email protected]>

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit e40699d)

Co-authored-by: Craig Perkins <[email protected]>
…sion variable (opensearch-project#1083) (opensearch-project#1085)

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit 964e804)

Co-authored-by: Ryan Liang <[email protected]>
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 <[email protected]>
(cherry picked from commit 057cbe4)

Co-authored-by: Vasile Irimia <[email protected]>
…roject#1094)

Signed-off-by: Craig Perkins <[email protected]>

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit d89d31b)

Co-authored-by: Craig Perkins <[email protected]>
…oject#1097)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 7e4b6c3)

Co-authored-by: Craig Perkins <[email protected]>
…nsearch-project#1105)

* Preserve URL HASH after user logs via SAML IDP

Co-authored-by: Darshit Chanpura <[email protected]>
(cherry picked from commit a9d10d8)

Co-authored-by: Deepak Devarakonda <[email protected]>
* SAML Integration Tests (opensearch-project#1088)
(cherry picked from commit a4fa35d)

Signed-off-by: Deepak Devarakonda <[email protected]>
Signed-off-by: Aniketh Jain <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: anijain-Amazon <[email protected]>
…el (opensearch-project#1112) (opensearch-project#1117)

Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit 3bfd7c5)

Co-authored-by: Ryan Liang <[email protected]>
…Authentication flow (opensearch-project#1134)

* SAML Integration Tests (opensearch-project#1088)

Signed-off-by: Deepak Devarakonda <[email protected]>
Signed-off-by: Aniketh Jain <[email protected]>
Signed-off-by: Aniketh Jain <[email protected]>
Co-authored-by: Deepak Devarakonda <[email protected]>

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

Signed-off-by: Yan Zeng <[email protected]>

Co-authored-by: Chang Liu <[email protected]>
(cherry picked from commit 6236fe2)

Co-authored-by: Yan Zeng <[email protected]>
) (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 <[email protected]>
(cherry picked from commit a21c7be)

* Support checkout out #.X branch types

Signed-off-by: Peter Nied <[email protected]>
…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 <[email protected]>
Signed-off-by: Ryan Liang <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Yan Zeng <[email protected]>

Co-authored-by: Ryan Liang <[email protected]>
Co-authored-by: Ryan Liang <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
Co-authored-by: Yan Zeng <[email protected]>
…-project#1189)

Signed-off-by: Yaliang Wu <[email protected]>
Co-authored-by: Chang Liu <[email protected]>
(cherry picked from commit 1ae8e24)
…pensearch-project#1191)

Signed-off-by: Aozixuan Priscilla Guan <[email protected]>

Co-authored-by: Craig Perkins <[email protected]>
Co-authored-by: Ryan Liang <[email protected]>
Co-authored-by: anijain-Amazon <[email protected]>
Co-authored-by: Deepak Devarakonda <[email protected]>
Co-authored-by: Chang Liu <[email protected]>
(cherry picked from commit eee08a5)
…roject#1198)

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit b451cb2)

Co-authored-by: Ryan Liang <[email protected]>
…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 <[email protected]>
(cherry picked from commit 3abb707)

Co-authored-by: Peter Nied <[email protected]>
opensearch-trigger-bot bot and others added 7 commits February 16, 2023 10:14
…ensearch-project#1323) (opensearch-project#1340)

Signed-off-by: Craig Perkins <[email protected]>
Co-authored-by: Peter Nied <[email protected]>
(cherry picked from commit d5441b2)

Co-authored-by: Craig Perkins <[email protected]>
…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 <[email protected]>
Co-authored-by: Stephen Crawford <[email protected]>
(cherry picked from commit 82c27c7)

Co-authored-by: Romain Tartière <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
…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 <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
(cherry picked from commit e5c0588)
…roject#1344)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 2506898)

Co-authored-by: Craig Perkins <[email protected]>
@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.

@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

@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