-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fix issue when using OpenID Authentication with serverBasePath #1899
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1899 +/- ##
=======================================
Coverage 69.94% 69.94%
=======================================
Files 97 97
Lines 2505 2505
Branches 336 343 +7
=======================================
Hits 1752 1752
Misses 672 672
Partials 81 81 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving our testing infrastructure, base path is not something that we usually have in mind as developers, if we are using yarn start --no-base-path
, but it is a real world use case. A few minor logistical comments, but otherwise looks good 👍
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me @cwperks. Could you please reply to/resolve the 2 open conversations?
@DarshitChanpura Replied to both outstanding comments. I was not able to figure out a way to reduce it to a single step. Can those be addressed in a follow-up PR? |
* Test OIDC with basePath Signed-off-by: Craig Perkins <[email protected]> * Run OIDC tests with basePath Signed-off-by: Craig Perkins <[email protected]> * Run all tests with basePath Signed-off-by: Craig Perkins <[email protected]> * Fix kibana url Signed-off-by: Craig Perkins <[email protected]> * Remove requirement on nextUrl Signed-off-by: Craig Perkins <[email protected]> * Remove duplicate Signed-off-by: Craig Perkins <[email protected]> * Add basePath to acs endpoint Signed-off-by: Craig Perkins <[email protected]> * Update snapshot Signed-off-by: Craig Perkins <[email protected]> * Start IdP where acs contains the basePath Signed-off-by: Craig Perkins <[email protected]> * es:lint --fix Signed-off-by: Craig Perkins <[email protected]> * Generalize SAML tests to include basePath Signed-off-by: Craig Perkins <[email protected]> * Add default Signed-off-by: Craig Perkins <[email protected]> * Use -z Signed-off-by: Craig Perkins <[email protected]> * Cypress env Signed-off-by: Craig Perkins <[email protected]> * Cypress env Signed-off-by: Craig Perkins <[email protected]> * Handle undefined Signed-off-by: Craig Perkins <[email protected]> * Always pass basePath Signed-off-by: Craig Perkins <[email protected]> * Remove ampersand Signed-off-by: Craig Perkins <[email protected]> * Pass basePath in yarn_command Signed-off-by: Craig Perkins <[email protected]> * re-add osd_base_path Signed-off-by: Craig Perkins <[email protected]> * Try ternary Signed-off-by: Craig Perkins <[email protected]> * Start with basePath Signed-off-by: Craig Perkins <[email protected]> * Use separate steps Signed-off-by: Craig Perkins <[email protected]> * Update shortenUrl Signed-off-by: Craig Perkins <[email protected]> * Remove basePath in acs endpoint and fix shorten URL Signed-off-by: Craig Perkins <[email protected]> * Comma-separated env Signed-off-by: Craig Perkins <[email protected]> * update oidc_auth_test.spec.js Signed-off-by: Craig Perkins <[email protected]> * Check cookie after login Signed-off-by: Craig Perkins <[email protected]> * failOnStatusCode false Signed-off-by: Craig Perkins <[email protected]> * mimic SAML Signed-off-by: Craig Perkins <[email protected]> * mimic SAML Signed-off-by: Craig Perkins <[email protected]> * Remove cy.origin Signed-off-by: Craig Perkins <[email protected]> * Add cy.origin back Signed-off-by: Craig Perkins <[email protected]> * Try wrapping in cy.url Signed-off-by: Craig Perkins <[email protected]> * Visit directly Signed-off-by: Craig Perkins <[email protected]> * Try localhost Signed-off-by: Craig Perkins <[email protected]> * Comment out test for now Signed-off-by: Craig Perkins <[email protected]> * Add another request after logout Signed-off-by: Craig Perkins <[email protected]> * Wait for logout Signed-off-by: Craig Perkins <[email protected]> * Small update Signed-off-by: Craig Perkins <[email protected]> * Add base_redirect_url Signed-off-by: Craig Perkins <[email protected]> * Explicitly add minimist as dev dependency Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Co-authored-by: Jialiang Liang <[email protected]> (cherry picked from commit 9662025)
#1946) * Test OIDC with basePath Signed-off-by: Craig Perkins <[email protected]> * Run OIDC tests with basePath Signed-off-by: Craig Perkins <[email protected]> * Run all tests with basePath Signed-off-by: Craig Perkins <[email protected]> * Fix kibana url Signed-off-by: Craig Perkins <[email protected]> * Remove requirement on nextUrl Signed-off-by: Craig Perkins <[email protected]> * Remove duplicate Signed-off-by: Craig Perkins <[email protected]> * Add basePath to acs endpoint Signed-off-by: Craig Perkins <[email protected]> * Update snapshot Signed-off-by: Craig Perkins <[email protected]> * Start IdP where acs contains the basePath Signed-off-by: Craig Perkins <[email protected]> * es:lint --fix Signed-off-by: Craig Perkins <[email protected]> * Generalize SAML tests to include basePath Signed-off-by: Craig Perkins <[email protected]> * Add default Signed-off-by: Craig Perkins <[email protected]> * Use -z Signed-off-by: Craig Perkins <[email protected]> * Cypress env Signed-off-by: Craig Perkins <[email protected]> * Cypress env Signed-off-by: Craig Perkins <[email protected]> * Handle undefined Signed-off-by: Craig Perkins <[email protected]> * Always pass basePath Signed-off-by: Craig Perkins <[email protected]> * Remove ampersand Signed-off-by: Craig Perkins <[email protected]> * Pass basePath in yarn_command Signed-off-by: Craig Perkins <[email protected]> * re-add osd_base_path Signed-off-by: Craig Perkins <[email protected]> * Try ternary Signed-off-by: Craig Perkins <[email protected]> * Start with basePath Signed-off-by: Craig Perkins <[email protected]> * Use separate steps Signed-off-by: Craig Perkins <[email protected]> * Update shortenUrl Signed-off-by: Craig Perkins <[email protected]> * Remove basePath in acs endpoint and fix shorten URL Signed-off-by: Craig Perkins <[email protected]> * Comma-separated env Signed-off-by: Craig Perkins <[email protected]> * update oidc_auth_test.spec.js Signed-off-by: Craig Perkins <[email protected]> * Check cookie after login Signed-off-by: Craig Perkins <[email protected]> * failOnStatusCode false Signed-off-by: Craig Perkins <[email protected]> * mimic SAML Signed-off-by: Craig Perkins <[email protected]> * mimic SAML Signed-off-by: Craig Perkins <[email protected]> * Remove cy.origin Signed-off-by: Craig Perkins <[email protected]> * Add cy.origin back Signed-off-by: Craig Perkins <[email protected]> * Try wrapping in cy.url Signed-off-by: Craig Perkins <[email protected]> * Visit directly Signed-off-by: Craig Perkins <[email protected]> * Try localhost Signed-off-by: Craig Perkins <[email protected]> * Comment out test for now Signed-off-by: Craig Perkins <[email protected]> * Add another request after logout Signed-off-by: Craig Perkins <[email protected]> * Wait for logout Signed-off-by: Craig Perkins <[email protected]> * Small update Signed-off-by: Craig Perkins <[email protected]> * Add base_redirect_url Signed-off-by: Craig Perkins <[email protected]> * Explicitly add minimist as dev dependency Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Co-authored-by: Jialiang Liang <[email protected]> (cherry picked from commit 9662025) Co-authored-by: Craig Perkins <[email protected]>
Description
This PR fixes a bug where the security-dashboards-plugin would redirect back to
/
instead of/{serverBasePath}
after authenticating with OpenID.This PR also performs all SAML, OpenID and Multi-auth cypress tests both without a basePath and with a basePath
Category
Bug Fix
Issues Resolved
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.