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

Eliminate full page reload when navigating to space selector after authenticating #59555

Open
legrego opened this issue Mar 6, 2020 · 3 comments
Labels
discuss Feature:Security/Authentication Platform Security - Authentication Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@legrego
Copy link
Member

legrego commented Mar 6, 2020

Currently, logging into Kibana is a multi-step process with Spaces enabled:

  1. Full page load: login screen
    1a) Authenticate (assuming basic/token providers here)
  2. Full page load: space selector
  3. Full page load: Kibana @ the selected space.

Ultimately, we should eliminate as many of these full page loads as possible.
Until #59377 is resolved, we can't eliminate step 3, as we require an updated set of UI Capabilities.

This issue is focused on eliminating the full page load at step 2, which we should be able to accomplish without #59377.

We should render the space selector UI via client-side routing after authenticating, if (and only if) the user is authorized to access more than one space, and their next query parameter indicates that they would otherwise be navigating to the Kibana root.

Doing this without a page reload means that the login page (and security in general) needs to be more aware of spaces. Spaces currently has its optional dependency on security declared, so we can't have security declare a dependency on spaces at this point.

I see a couple of paths forward, none of which are great. I'm open to all other ideas:

  1. Allow security to have a dependency on spaces, by eliminating space's dependency on security. This likely involves splitting out the shared authorization code into its own plugin that both security and spaces can depend on, or reimagining how we authorize access to spaces themselves.
  2. Have security make its own calls to the spaces APIs (extending them as necessary), without declaring a dependency
  3. Expose an internal security api which uses the spaces service we already depend on to figure out if the login page should route to the space selector or not.
    1. Full page load: login screen
    2. Authenticate
    3. XHR request -> /internal/security/_get_next_location?next=...
    4. Route to space selector (or wherever)
  4. Have security expose a service to allow other plugins (such as Spaces) to listen for successful login attempts, and override the default action if necessary
@legrego legrego added discuss Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Authentication Platform Security - Authentication Feature:Security/Spaces Platform Security - Spaces feature labels Mar 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@legrego
Copy link
Member Author

legrego commented Sep 10, 2020

Given our current priorities, it's unlikely that we will get to this before #59377 is resolved. It is probably worthwhile to wait for #59377 at this point so that the mechanism for navigating to the space selector is identical to the way we navigate to any other application within Kibana w/r/t dynamic capabilities.

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Aug 5, 2021
@jportner
Copy link
Contributor

jportner commented Sep 8, 2021

Note from today's meeting: this is not well-defined, and some of the issue description is out of date from our old circular dependency. This issue needs some research and design work before implementation.

@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Sep 27, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Dec 8, 2021
@legrego legrego removed EnableJiraSync loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Security/Authentication Platform Security - Authentication Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

4 participants