Since https://github.com/elastic/elasticsearch/issues/59685 is resolved now (7.11.0+) we can proceed and remove redundant _authenticate calls after we create any kind of access token (Token/SAML/OIDC/Kerberos/PKI) that would improve login performance and make code simpler overall.
Pinging @elastic/kibana-security (Team:Security)
Let me try to work on this issue.
Hello, @azasypkin!
I don't understand how to check if we have already created any kind of access token.
Could you explain?
Hello, @azasypkin!
I don't understand how to check if we have already created any kind of access token.
Could you explain?
Let's take a Token provider as an example, the response for this call already includes all required user information (see authentication field in response, here is the underlying API), that means you don't need to call getUser (based on this API internally) afterwards.
I'd suggest you to call these APIs manually and see what they return, I believe it should make clearer where you can eliminate unnecessary calls.
Hey @gorogoroumaru ,
I'm going to pick this issue up soon since it's an improvement we'd like to include in the next minor release. But let me know if you're already working on it and planning to come up with a PR any time soon.
If you don't have time or interest anymore, that's totally fine, feel free to observe the linked the PR then. That can be useful for you anyway if you're going to contribute to Kibana in the future.
I鈥檓 sorry @azasypkin.
I had a lot of trouble in setting up development environment and understanding how to use the authentication APIs.
I will observe the PR and study for the later contribution.