It looks like you want to use OAuth2.0 to access Elasticsearch using Linkedin as an Authorization server? As in, you want to login to Elasticsearch with your Linkedin account ? This is unfortunately not possible.
Elasticsearch (as of version 7.2) supports OpenID Connect, which is an authentication protocol based on oAuth2 and is considered the de facto standard for authentication based on oAuth2. As long as Linkedin doesn't support OpenID Connect, you won't be able to use it to authenticate to Elasticsearch. Your only option is to implement a custom realm for Elasticsearch and support Linkedin's protocol.
Can you clarify this a little further ? This doesn't sound like it requires you/your users to login with Linkedin, but maybe I have misunderstood your use case.
I actually want to index the content from public pages in LinkedIn.
I initially thought, I need to use OAuth 2.0 but then realized that it is not possible to sign in every time to get the new access token for every member.
Is there a legal way, that I can index the content or basic members data from public pages in elasticsearch.?
This question would be exactly the same if you substitute Elasticsearch with anything else, and in that sense I don't think this forum is the best place to get some useful/definitive answer. Maybe you can look at the Linkedin terms of service or ask in a more generic forum
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.