cloudfoundry-community / logsearch-for-cloudfoundry

A Logsearch addon that customises Logsearch to work with Cloud Foundry data
Apache License 2.0
49 stars 58 forks source link

Following Kibana permalinks redirects to the space selector if the user is not logged in #359

Open mymasse opened 3 years ago

mymasse commented 3 years ago

Version

Steps to reproduce

  1. Get a permalink from Kibana
  2. Logout or from a private browsing window
  3. Paste the permalink
  4. Get redirected to the CF UAA for login
  5. Enter credentials

Expected result

After login get directed to the provided permalink

Actual result

Get redirected to the Space Selector screen

mymasse commented 3 years ago

@braunsonm Feel free to add the more technical details you found

braunsonm commented 3 years ago

Hey so I took at look at this yesterday.

The usually method would be to encode the redirect URL in the state parameter in OAuth requests. However you do not have control over this in the bell library, the state is hard-coded. My other idea would be to save the redirect URL as a cookie when you trigger the redirect to /login here. Then restore that link instead of the hardcoded redirect to / here.