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

License should not be retrieved on anonymous pages #99501

Closed
legrego opened this issue May 6, 2021 · 6 comments
Closed

License should not be retrieved on anonymous pages #99501

legrego opened this issue May 6, 2021 · 6 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:License Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@legrego
Copy link
Member

legrego commented May 6, 2021

The licensing plugin attempts to query for the current license on page load -- there is some logic in place to prevent this from happening on anonymous pages (such as the login page), but it appears to be an incomplete check. The result is a 401 response on the login page:

image

@legrego legrego added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:License labels May 6, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@pgayvallet
Copy link
Contributor

there is some logic in place to prevent this from happening on anonymous pages

The logic checking if we're on an anonymous page is only here to disable the license refresh based on the kbn-license-sig header. it doesn't disable the initial license fetch or any manually triggered refresh.

We could eventually disable the initial fetching totally, but I'm a bit afraid of the implications, as even on an anonymous page, we load all the plugins.

We already talked about it, but I feel like this issue is bigger than just licensing, and that most plugins should just not be loaded on most (all?) anonymous pages.

@mshustov
Copy link
Contributor

We already talked about it, but I feel like this issue is bigger than just licensing, and that most plugins should just not be loaded on most (all?) anonymous pages.

My +1, considering that we are going to reload the whole Kibana after log in.

@legrego
Copy link
Member Author

legrego commented May 18, 2021

I'm torn -- given Kibana's current state, I would agree that most plugins shouldn't be loaded on most anonymous pages.

However, I'd really like to get to the point where we can eliminate some of these page reloads (relies on #59377). If we can get there, then we either need these plugins to load on all pages, or ensure that all plugins are able to complete the full setup/start/stop lifecycle multiple times (i.e., actually clean themselves up during stop)

@Bamieh
Copy link
Member

Bamieh commented May 24, 2021

I would agree that most plugins shouldn't be loaded on most anonymous pages.

++. Note that the telemetry plugin benefits from being loaded on every page so it can send us usage data as soon as possible. Since the data is encrypted we dont care if the browser sending the data is on an anonymous page or not.

@pgayvallet
Copy link
Contributor

I just tested on a 8.14 and on main (8.16), and it seems the issue can no longer be reproduced.

Screenshot 2024-07-22 at 14 59 43

Not sure when this changed (I suspect the changes we did a while ago about loading only a subset of plugins on the anonymous pages), but this is resolved.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:License Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

5 participants